|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||25||18||16||69.565%|
An alpha puzzle is a type of crossword puzzle where each letter square (ie one that is not black) contains a number to represent a letter. Throughout the puzzle, a particular letter is always represented by the same number. All letters of the alphabet are used, so numbers range from 1 to 26.
In this problem you will be given a solution to an alpha puzzle and have to assign numbers to the letters. Some alpha puzzles assign numbers to letters randomly, but the one that appears in the New Zealand Herald every day uses a non-random method which you have to implement.
The answer grid is read left to right, top to bottom; spaces (which represent black squares) are ignored. The first letter encountered is assigned the number 1, the next number 2 and so on. Only the first occurrence of a letter is processed, so only 26 numbers are allocated.
You will be presented with a single puzzle solution which starts with a single integer, S, on a line by itself (10 <= S <=20). S is the size of the puzzle – the number of rows and columns of squares that it contains.
There will then follow S lines, each containing S characters, all upper case letters or spaces. Every letter of the alphabet will appear at least once.
Follow the rules for letter allocation described above then output the 26 letters of the alphabet in their assigned numerical order so that, for example, the first letter is the one to which the number 1 is assigned, the last the one to which 26 was assigned.
13 CITADEL POPPY H O O U A L I ARROW MASSAGE S S N B S C L SHOULDER BARD I O R T T SQUEAL FRIEZE N D A O X FILE CLAPTRAP E U J T I A L VACCINE CARGO E K V R A E D RHYME SPLURGE