t=int(input()) for i in range(t): h,w,d=map(int,input().split()) if h>w:h,w=w,h h**=2 if w%2:h+=1 if h<=d*d:k='N' else:k='S' print(k)