S=eval(input())

if S=="RRR":

  print((3))

elif "RR" in S:

  print((2))

elif "R" in S:

  print((1))

else:

  print((0))
S=input().split("S")

ans=0

for i in S:

  ans=max(ans,len(i))

print(ans)

#これ思いつく人すごいなぁ
S = eval(input())
if S == "RRR":
    print((3))
elif "RR" in S:
    print((2))
elif "R" in S:
    print((1))
else:
    print((0))

S = input().split("S")
ans = 0
for i in S:
    ans = max(ans, len(i))
print(ans)
# これ思いつく人すごいなぁ

-S = eval(input()) -if S == "RRR": -    print((3)) -elif "RR" in S: -    print((2)) -elif "R" in S: -    print((1)) -else: -    print((0)) +S = input().split("S") +ans = 0 +for i in S: +    ans = max(ans, len(i)) +print(ans) +# これ思いつく人すごいなぁ