#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> T; while(T--){ ll x; cin >> x; if(x==1) cout << 2 << endl; if(x==2) cout << 5 << endl; if(x==3) cout << 6 << endl; if(x==4) cout << 5 << endl; if(x==5) cout << 6 << endl; if(x>5) cout << 3 << endl; } return 0; }