#include #include #include using namespace std; int main() { int n; cin >> n; vector list1 = {1, 3, 4, 5, 7, 8}; for (int i = 0; i < n; i++){ int c; cin >> c; if (find(list1.begin(), list1.end(), c) == list1.end()) { cout << 2 << endl; } else { cout << 1 << endl; } } }