T = int(input()) for _ in range(T): H,W,D = map(int,input().split()) if H%2==0 and W%2==0 and D>=min(H,W): print("N") elif H%2==0 and W%2==1 and (D>=W or D*D>=H*H+4): print("N") elif H%2==1 and W%2==0 and (D>=H or D*D>=W*W+4): print("N") elif H%2==1 and W%2==1 and D*D>=min(W*W+2,H*H+2): print("N") else: print("S")