Strip 3#2333

Strip 3

1 second
64 megabytes
Hard

A vertically positioned rectangular paper strip, fixed at the lower end, is folded as follows:

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.

Input

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

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.

Examples

Example 1

Loading
Loading