As the new term comes, the Ignatius Train station is very busy. A lot of student want to get back to school by train (because the trains in the Ignatius train station are the fastest all O Ver the world ^v^). But Here comes a problem, there are only one railway where all the trains stop. So all of the trains come in from one side and get out of the other side. For this problem, if train a gets into the railway I, and then train B gets into the railway before a train, tr Ain A can ' t leave until train B leaves. The pictures below figure out the problem. Now the problem for are, there are at most 9 trains in the station, all the trains has a ID (numbered from 1 to N), the Trains get into the "railway in" Order O1, your task are to determine whether the trains of the "can get out of" an order O2.
Input
The input contains several test cases. Each test case consists of a, the number of trains, and two strings, the order of the trains come in:o1, and the Order of the trains Leave:o2. The input is terminated by the ' End of file '. More details in the Sample Input.
Output
The output contains a string "No." If you can ' t exchange O2 to O1, or your should output a line contains "Yes.", and then O Utput your way in exchanging the order (you should output ' in ' for a train to the getting, and ' out ' for a railway Getting out of the railway). Print a line contains "FINISH" for each test case. More details in the Sample Output.
Sample Input
3 123 321 3 123 312
Sample Output
Yes. Out FINISH No. FINISH
Hint
So now train 3 are at the top of the railway, so train 3 can leave a, then train 2 and train 1.
In the second Sample input, we are should let train 3 leave I, so we have to let train 1 get in, then train 2 and train 3.
Now we can let train 3 leave.
But after so we can ' t let train 1 leave before train 2, because train 2 are at the top of the railway at the moment.
So we output "No."