t = int(input()) for i in range(t): h,w,d = map(int,input().split()) if h%2 == 0 and w % 2 == 0: need = min(h**2,w**2) if h%2 == 0 and w % 2: need = min(h**2,w**2+1) if h%2 and w % 2 == 0: need = min(w**2,h**2+1) if h%2 and w % 2: need = min(h**2,w**2)+1 if need < d**2: print("N") else: print("S")