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