#include using namespace std; #define ll long long int main() { ios::sync_with_stdio(0); cin.tie(0); int T; cin >> T; for (int i=0;i> N; if (N >= 100) { cout << 2 << "\n"; } else { while (N >= 3) { int cnt = 0; for (int j=1;j<=N;j++) { if (N%j == 0) cnt++; } N -= cnt; } cout << N << "\n"; } } return 0; }