t = int(input()) for _ in range(t): h, w, d = map(int, input().split()) d_min = min(h, w) print("N" if d_min ** 2 <= d ** 2 else "S")