#include using namespace std; int main() { int t; cin >> t; while(t--) { int n; cin >> n; if(n == 2 || n == 6 || 9 <= n) { cout << 2 << endl; } else { cout << 1 << endl; } } }