#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; using ll = long long; using ld = long double; int main(){ cin.tie(0); ios::sync_with_stdio(0); int T; cin >> T; rep(_,T) { ll H,W,D; cin >> H >> W >> D; enum { SECOND, FIRST }; using i128 = __int128_t; cout << ([&H, &W, D]() { pair p = {H % 2, W % 2}; if(p == make_pair(0, 0)) { if(H <= D) return FIRST; if(W <= D) return FIRST; return SECOND; } else if(p == make_pair(1, 1)) { if(H * H + 1 * 1 <= D * D) return FIRST; if(W * W + 1 * 1 <= D * D) return FIRST; return SECOND; } else { if(p.first == 1) swap(H, W); if(H * H + 1 * 1 <= D * D) return FIRST; if(W <= D) return FIRST; return SECOND; } } () ? "N" : "S") << "\n"; } }