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