#include using namespace std; #ifdef _RUTHEN #include "debug.hpp" #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; rep(tt, T) { ll N; cin >> N; if (N >= 9 or N == 2 or N == 6) { cout << 2 << '\n'; } else { cout << 1 << '\n'; } } return 0; }