from decimal import Decimal from math import sqrt t = int(input()) for _ in range(t): h, w, d = map(Decimal, 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 + Decimal("1")), sqrt(w ** 2)) if h % 2 == 1 and w % 2 == 0: d_min = min(sqrt(h ** 2), sqrt(w ** 2 + Decimal("1"))) if h % 2 == 1 and w % 2 == 1: d_min = min(sqrt(h ** 2 + Decimal("1")), sqrt(w ** 2 + Decimal("1"))) print("N" if d_min <= d else "S")