#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int mod=1e9+7; int main(){ int t,n; cin>>t; while(cin>>n) cout<<(n<=8&&n!=2&&n!=6?1:2)<