mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline for _ in range(int(input())): H, W, D = map(int, input().split()) if H > W: H, W = W, H if W % 2 == 0: if D <= H: print("S") else: print("N") else: if D ** 2 <= (H ** 2) + 1: print("S") else: print("N") if __name__ == '__main__': main()