A vertically positioned rectangular paper strip, fixed at the lower end, is folded as follows:
In the first step, the strip is folded in half so that the upper half lies on the lower half, either in front (P-fold) or behind (Z-fold).
In the subsequent n-1 steps, similar folds are made with the strip obtained from the previous step, treating it as a single unit.
After all the folds, the strip is unfolded back to its original state. It retains creases from the folds, with some creases facing towards us (K-edges) and others facing away (O-edges). The creases are numbered from top to bottom, from to 2^n-1.
The task is to write a program that, given a string of uppercase letters "O" and "K", where the -th position indicates the type of edge on the unfolded strip, determines a sequence of uppercase "P" and "Z" that represents the sequence of folds used to achieve this pattern. If no such sequence exists, output NO.
The first line of the input file contains the number , representing the number of folds ( is no more than ). The second line contains a string of 2^n-1 characters, each being "O" or "K", indicating the types of edges on the unfolded strip.
Output a single line containing a string of characters, each being "P" or "Z", that specifies the sequence of folds. If no such sequence exists, output NO.
Example 1