#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(A>A[i]; sort(A,A+5); vectorB; for(int i=0;i<5;) { int j=i; while(j<5&&A[i]==A[j])++j; B.push_back(j-i); i=j; } int a=count(ALL(B),2),b=count(ALL(B),3); string ans="NO HAND"; if(a&b)ans="FULL HOUSE"; else if(b)ans="THREE CARD"; else if(a==2)ans="TWO PAIR"; else if(a==1)ans="ONE PAIR"; cout<>TE; while(TE--)sol(); }