import math import sys def main(): input = sys.stdin.read().split() Q = int(input[0]) idx = 1 for _ in range(Q): N = int(input[idx]) M = int(input[idx+1]) K = int(input[idx+2]) idx +=3 if K == 1: print("Flush" if 1 < 1 else "Straight") # Unreachable due to problem constraints continue a = N - K + 2 # Compute sum1: sum_{x=a}^N ln(x) ≈ integral from a-1 to N of ln(x) dx if a > N: sum1 = 0.0 else: x_upper = N + 1 integral_upper = x_upper * math.log(x_upper) - x_upper x_lower = a - 1 if x_lower < 1: x_lower = 1 integral_lower = 0.0 else: integral_lower = x_lower * math.log(x_lower) - x_lower sum1 = integral_upper - integral_lower # Compute sum2: ln(K!) using Stirling's approximation if K == 0: sum2 = 0.0 else: sum2 = K * math.log(K) - K + 0.5 * math.log(2 * math.pi * K) left_part = sum1 - sum2 threshold = left_part / (K - 1) ln_M = math.log(M) if ln_M > threshold: print("Flush") else: print("Straight") if __name__ == "__main__": main()