#00009F

z-knight

While Mr. Little Z. was playing chess with his firend, Isidora was secretly looking at him. She doesn't know how to play chess, so he asked Mr. Little Z. to teach her. Little Z was patiently teaching her how do the pieces move. First he taught her how Kings move, then Pawns, and finally the next piece on the list was the Knight.
• The Knight moves as described on the figure below (if S is the position of the knight it can move to the positions marked with x.
• The Knight can move only within the borders of the table (it can not jump outside the table) and also, it can only move to the fields that are not occupied with some other piece (of the same player).


Image: konj

We represent a chess board as a 8x8 square fields. The fields are named as on the figure above. On the figure above the Knight is on the field d4. On the board we will have one King, one Knight and 0-8 Pawns. All the pieces will be of the same color (belonging to the same player). Help Isidora to figure out to which fields she can move the Knight


InputFrom the first line of the standard input you should read the positions of all the pieces. The first piece represents the position of the King, the second represents the position of the Knight, and finally the next 0-8 represent the positions of the Pawns.

OutputTo the one line of the standard output write the names of all the fields to which the Knight can move (in the next move). If there is more than one field to which the Knight can move, then output the fields in clockwise order starting with 12hrs (straight up). If the Knight can not move to any field then write »IMPOSSIBLE« (make sure the letters are capital)

Input:
e8 a4 a7 b7 c7 e7 d7
Output:
b6 c5 c3 b2
The Knight is on the field a4.

Input:
f7 h8 g6
Output:
IMPOSSIBLE
The Knight is on the field h8.

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.