13433 - The password   

Description

Mr. Kuo is an adventurer. One day, he finds a secret room in a cave.

There is some hint to the password of this room.

 

Mr. Kuo is given an integer N and a string S = s1s2...sN consisting of L and R.

At first, Mr. Kuo has a string A = "0".

For each i = 1, 2, ..., N :

  • If si is L, insert i to the left of the "number" i - 1 in A.
  • If si is R, insert i to the right of the "number" i - 1 in A.

 

The final contents of A is the password. Please help Mr. Kuo find the password.

 

For example, N = 3 and S = "LRL", then:

  • s1 = L, insert 1 to the left of 0,   A = "10"
  • s2 = R, insert 2 to the right of 1, A = "120"
  • s3 = L, insert 3 to the left of 2,   A = "1320"

 

Input

The first line contains one integer T — the number of test cases. Description of the test cases follows.

The first line of each test cases contains an integer N.

The second linef of each test cases contains a string S consisting of L and R of length N.

 

For each test:

  1. T ≤ 100, N ≤ 10
  2. T ≤ 100, N ≤ 100
  3. T ≤ 100, N ≤ 500
  4. T ≤ 100, N ≤ 1000
  5. T ≤ 100, N ≤ 10000
  6. T ≤ 10, N ≤ 100000

 

Output

For each test case print a string A — the final contents of the password, seperated by spaces.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss