There are two arrays a, b of length n, where ai = i, i = 1, 2, ..., n. Also, you have another array c which is empty at the beginning.
Your task is to transform c into b, using the following operations:
It is guaranteed that there always exists a series of operation that can transform c into b.
The first line contains an integer n, representing the length of a and b. The second line contains n integers b1, b2, ..., bn.
Output 2n lines. If the i-th operation is the first type, output "Push" (without quote) in the i-th lines; otherwise, output "Pop" (without quote).
It can be shown that the seires of the operations are unique, and we always need 2n operations to complete the task.
For the sample testcase, the following shows the content of a, c, and stack after each operation:
Operation | a | c | stack |
1 | 2, 3, 4 | 1 | |
2 | 3, 4 | 1, 2 | |
3 | 4 | 1, 2, 3 | |
4 | 4 | 3 | 1, 2 |
5 | 4 | 3, 2 | 1 |
6 | 3, 2 | 1, 4 | |
7 | 3, 2, 4 | 1 | |
8 | 3, 2, 4, 1 |