#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } set one{1, 3, 4, 5, 7, 8}; void solve() { int n; cin >> n; if (one.find(n) != one.end()) { cout << "1\n"; } else { cout << "2\n"; } } int main() { fast_io(); int t; cin >> t; for (; t--;) { solve(); } }