Submit solution


Points: 100
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

Ikea

Problem Statement

Indra is shopping at Ikea. They find a row of n tables, with n price tags interspersed between them. However, a dilemma awaits! Indra cannot tell which price tag corresponds to which table.

For each table, output whether its price tag is to its left (L) or right (R).

Input

The first line will contain a single integer n.

The next line will contain a string of length 2n. The string consists of the characters '#' (Pricetag) or 'T' (Table).

Output

One line, consisting of n characters of either 'L' or 'R'.

Constraints

For all test cases, 1 \le n \le 10^5.

It is guaranteed that there is a unique valid allocation of tables to their adjacent price tags.

Sample Test Cases

Example 1
Input
3
T##T#T
Output
RLL
Explanation

The first table (index 0) corresponds to the pricetag to its right (index 1). The other two tables correspond to the pricetags to their left (index 3 to index 2, index 5 to index 4).

Python Template

n = int(input())
string = input()

Comments

There are no comments at the moment.