#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, i, j, counter, flag = 1;
    cin >> n;
    for (int i = n; i >= 1; i--) {
      j = i;
      counter = 0;
      while (j <= n) {
        counter++;
        j += i;
        if (counter == 2) {
          cout << i << endl;
          flag = 0;
          break;
        }
      }
      if (flag == 0) break;
    }
  }
}
