T=int(input()) for i in range(T): H,W,D=map(int,input().split()) if H**2+(W%2)**2<=D**2 or W**2+(H%2)**2<=D**2: print("N") else: print("S")