#include using namespace std; int main() { int t; cin >> t; set st; st.insert(1); st.insert(3); st.insert(4); st.insert(5); st.insert(7); st.insert(8); while (t--) { int N; cin >> N; if (st.count(N)) { cout << 1 << endl; } else { cout << 2 << endl; } } }