#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 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 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 : an integer .
Lines to : each line has characters, representing skj's transparent sheet, where O indicates an unblackened cell and # indicates a blackened cell.
Lines to : each line has 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
.
Translated by ChatGPT 5
京公网安备 11011102002149号