#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int t; cin >> t; while (t--) { int n; cin >> n; cout << (n < 9 && (n != 2 && n != 6) ? 1 : 2) << '\n'; } return 0; }