The Dramatic Queue

Contestants numbered 11 through NN begin in a queue in that order, with contestant 11 at the front.

The host issues commands:

Determine the order in which contestants go onstage.

There are exactly NN occurrences of E. The queue is nonempty before every command, and the last command empties it. Passing or reversing a queue with one person leaves it unchanged.

Input

The first line contains NN and MM: the number of contestants and commands.

The second line contains MM characters, each P, R, or E.

Output

Print the NN contestant numbers in the order they go onstage, separated by spaces.

Constraints

Notes

In Sample 1, after P and R, the queue is 1,4,3,21, 4, 3, 2. The next two commands remove 11 and 44. Passing then puts 22 ahead of 33.

In Sample 2, reversing gives 3,2,13, 2, 1. Passing gives 2,1,32, 1, 3, and then everyone leaves.

Sample Input 1 Sample Output 1
4 7
PREEPEE
1 4 2 3
Sample Input 2 Sample Output 2
3 5
RPEEE
2 1 3