#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ int T; cin >> T; vector v = {1,3,4,5,7,8}; while(T){ T--; int N; bool f=0; cin >> N; for (auto x : v) if (N == x) f=1; cout << (f ? 1 : 2) << endl; } return 0; }