#include using namespace std; int main() { int t; cin >> t; while(t--) { int n; cin >> n; if(n == 1 || n == 3 || n == 4 || n == 5 || n == 7 || n == 8) { cout << 1 << endl; } else { cout << 2 << endl; } } }