Time limit
1s
Memory limit
128 MB
Every day, Byunghyun sends Jieuni a secret letter made of the letters A through H. Each letter is represented by a 6-bit code made of 0s and 1s.
| Letter | Code |
|---|---|
| A | 000000 |
| B | 001111 |
| C | 010011 |
| D | 011100 |
| E | 100110 |
| F | 101001 |
| G | 110101 |
| H | 111010 |
If a communication error occurs, at most one digit in the 6-bit code for a single letter may arrive incorrectly. Jieuni interprets a received 6-bit code as a letter when it is exactly equal to that letter's code, or when it differs from that code in exactly one position.
If the received code differs from every code in the table by at least two positions, that letter cannot be identified. Split the received letter into 6-bit chunks from the front. If every chunk can be identified, print the decoded string. Otherwise, print the 1-based position of the first chunk that cannot be identified.
The first line contains the number of sent letters, N. N is less than 10.
The second line contains a string of length 6N. The string consists only of 0s and 1s.
If the entire received letter can be decoded, print the string Jieuni understands.
If there is a chunk that cannot be identified, print the position of the first such chunk.