#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m = 1, i = 1;
    cin >> n;
    while (n > 1) {
      if (n % 2 == 0) i = gcd(n, n / 2);
      if (n % 3 == 0) i = max(gcd(n, n / 3), i);
      n--;
      m = max(m, i);
    }
    cout << m << endl;
  }
  return 0;
}
