# https://www.codewars.com/kata/56dbeec613c2f63be4000be6/train/python


def diag_1_sym(strng):
    
    input_string = strng.split('\n')
    output_string = [''] * len(input_string)

    for main_element in input_string:
        for index, element in enumerate(main_element):
            
            output_string[index] += element
                
    return '\n'.join(output_string)

def rot_90_clock(strng):

    input_string = diag_1_sym(strng).split('\n')
    for index, element in enumerate(input_string):
        input_string[index] = element[::-1]

    return '\n'.join(input_string)

def selfie_and_diag1(strng):
    input_string = strng.split('\n')
    input_string_symetric = diag_1_sym(strng).split('\n')

    for index, element in enumerate(input_string):
        input_string[index] = element + '|' + input_string_symetric[index]

    return '\n'.join(input_string)


def oper(fct, s):
    return fct(s)
















# https://www.codewars.com/kata/56dbeec613c2f63be4000be6/train/python


def diag_1_sym(strng):
    
    input_string = strng.split('\n')
    output_string = [''] * len(input_string)

    for main_element in input_string:
        for index, element in enumerate(main_element):
            
            output_string[index] += element
                
    return '\n'.join(output_string)

def rot_90_clock(strng):

    input_string = diag_1_sym(strng).split('\n')
    for index, element in enumerate(input_string):
        input_string[index] = element[::-1]

    return '\n'.join(input_string)

def selfie_and_diag1(strng):
    input_string = strng.split('\n')
    input_string_symetric = diag_1_sym(strng).split('\n')

    for index, element in enumerate(input_string):
        input_string[index] = element + '|' + input_string_symetric[index]

    return '\n'.join(input_string)


def oper(fct, s):
    return fct(s)
















# https://www.codewars.com/kata/56dbeec613c2f63be4000be6/train/python