#P2191. 小Z的情书

小Z的情书

Description

Although Xiao Z was very careful, the cunning Xiao D still discovered the trick. Being generous, Xiao D naturally wants to share this secret with everyone. Xiao Z starts with two N×NN \times N sheets of paper: one is transparent, and the other has letters on it. Then Xiao Z blacks out some cells on the transparent sheet. Next, he gives both sheets to the girl. The girl and Xiao Z have agreed in advance to read it as follows: first place the transparent sheet on top of the other sheet, then write down the exposed letters in row-major order, from top to bottom and from left to right; then rotate by 9090 degrees and read again... do this a total of four times... see the sample.

Xiao D somehow got the love letter. Please enjoy it together and print out the content.

Input Format

Line 11: an integer NN.

Lines 22 to N+1N+1: each line has NN characters, representing skj's transparent sheet, where O indicates an unblackened cell and # indicates a blackened cell.

Lines N+2N+2 to 2N+12N+1: each line has NN characters, containing only uppercase letters, representing the other sheet as described.

Output Format

One line: the content of the love letter.

4
##O#
#O#O
####
###O
ARAO
PCEM
LEEN
TURC
ACMCENTRALEUROPE

Hint

1N10001 \leq N \leq 1000.

Translated by ChatGPT 5