Given:
Task:Find the path leading to the grid (盤面)
The first integer is the number of nodes. Each node consists of:
Each node will have at most 2 children.
The last three lines are the tic-tac-toe grid. Each line has 3 marks (‘X’,’O’,’_’), separated by whitespaces, newline at the end.
The grid (盤面) in input definitely exists and is unique.
IDs of the nodes in the path leading to the grid, separated by whitespaces, followed by a new line
eg. 0 1 3 8 11