#0000C4

Tenis

Table tennis judge Ðura was invited to be the judge in the finals of famous SCG OPEN 2004. However, the organisers later found out that Ðura is not very familiar with the points system in tennis, which differs from the one in table tennis. Everything that was left were Ðura's notes. The organisers want to use the notes to reconstruct the final score of the match (which wasn't finished because of the incident).


The rules of tennis are:
* Player has to win at least 4 points and has at least two points more than the opponent to win a game.
* Player that wins 6 games and has at least two games more than his opponent wins the set. (SCG open doesn't have tie-break)
* Only one player serves until the end of the game.
* Players take turns, one player serves in one game and the other player serves in the next game.


InputInput has exactly one line that consists of characters 'S' and 'P' without spaces. Character 'S' on i-th place means that the player who served won i-th point. Character 'P' on i-th place means that the player who was receiving the serve won i-th point. There were at most 1000 points played in the match.

OutputOutput should contain the results of every set. Each line should contain the results of each set (the number of games each player won). That means that the number of lines is the number of sets played and the lines should contain two numbers seperated by a space. The first number is the number of games the first player won in that set and the second number is the number of games the second player won in that set. The first number in the line should always be the number of games won by the player who was the first server in the match.



Ulaz:SSSSSSSSSSSSSSS
Izlaz:2 1

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.