It is festival day, and students are rushing to line up at their favourite booths. The festival can be modelled as an .
) or contains a student (denoted by S
). Students walk directly downwards to line up at their respective booths. There is never more than one student in one cell. What would the festival look like once all the students have lined up?
Constraints
For all test cases:
Note: You must pass all test cases in order to earn points on this problem.
Input Specification
The first line contains one integer
The next .
or S
characters.
Output Specification
Output .
or S
, representing the festival after the students have lined up.
Sample Input
5
S..SS
.S...
..S.S
...SS
S....
Sample Output
.....
.....
....S
S..SS
SSSSS
Comments