while True: n=int(input()) if n==-1: break for i in range(n): h,p,x=map(int,input().split()) print("S")