#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ll long long
#define ld long double
ll const N=1e6+5;
ll const INF=8223372036854775807;

#define pb push_back
#define popb pop_back()
#define pf push_front
#define popf pop_front()
#define si size()
#define be begin()
#define en end()
#define all(v) v.be, v.en
#define len length()
#define mp make_pair
#define mt make_tuple
#define umap unordered_map
#define uset unordered_set
#define acc(v) accumulate(all(v), 0)
#define F first
#define S second

#define forz(i, n) for (ll i = 0; i < n; i++)
#define fore(i, m, n) for (ll i = m; i <= n; i++)
#define rforz(i, n) for (ll i = n - 1; i >= 0; i--)
#define rfore(i, m, n) for (ll i = n; i >= m; i--)
#define deci(n) fixed << setprecision(n)
#define high(n) __builtin_popcount(n)
#define highll(n) __builtin_popcountll(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define lb lower_bound
#define ub upper_bound
#define er equal_range
#define maxe *max_element
#define mine *min_element
#define mod 1000000007
#define mod2 998244353
#define PI 3.1415926535
#define gcd __gcd
#define prag ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)

#define endl "\n"
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c << endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << endl

typedef pair<ll,ll> pll;
typedef pair<pll,ll> plll;

/*
// GRAPHS
vector<ll> adj[N];

ll depth[N],sizz[N];
bool visited[N];
// ll clr[N];

void bfs(ll s,ll p){
    sizz[s]=1;
    visited[s]=true;

    for(auto x:adj[s]){
        if(x==p){
            continue;
        }

            if(visited[x]==false)
            {

            depth[x]=depth[s]+1;
            bfs(x,s);
            sizz[s]=sizz[s]+sizz[x];

            }

    }
}

*/

bool checkPrime(ll x)
{
    if (x == 1)
    {
        return false;
    }
    if (x <= 3)
    {
        return true;
    }
    ll t = 2;
    if (x % 2 == 0)
    {
        return false;
    }
    t = 3;
    for (t; t <= sqrt(x); t += 2)
    {
        if (x % t == 0)
        {
            return false;
        }
    }
    return true;
}

/// used for internal sorting in minpriority queue
template <class pll> struct greatter : binary_function <pll,pll,bool> {
  bool operator() (const pll& p1, const pll& p2) const
  {
    if(p2.S-p2.F>p1.S-p1.F) return true;
    else if(p2.S-p2.F==p1.S-p1.F)
    {
        if(p1.F>p2.F)  return true;
        else return false;
    }
    else return false;
  }
};

ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;

    while (y > 0)
    {

        if (y & 1)
            res = (res*x) % p;

        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}

ll modInverse(ll n, ll p)
{
    return power(n, p-2, p);
}

ll nCrModPFermat(ll n, ll r, ll p)
{

   if (r==0)
      return 1;

    ll fac[n+1];
    fac[0] = 1;
    for (ll i=1 ; i<=n; i++)
        fac[i] = fac[i-1]*i%p;

    return (fac[n] % p * modInverse(fac[r], p) % p* modInverse(fac[n-r], p) % p) % p;
}

// ll dp[3605][8005];
// ll countsubsets(vector<ll> arr,ll ss, ll i,ll remsum)
// {
//    if(i==ss)
//    {
//        if(remsum==0) return 1;
//        else return 0;
//    }

//    if(dp[i][remsum]!=-1) return dp[i][remsum];
//    else
//    {
//        dp[i][remsum]=countsubsets(arr,ss,i+1,remsum)+countsubsets(arr,ss,i+1,remsum-arr[i]);
//        return  dp[i][remsum];
//    }

// }

bool comp(char c1,char c2)
{
    if(c1>c2) return true;
    else return false;
}

// ll count(ll a, ll b, ll limit)
// {
// ll initialcount=limit/(a+b);
// ll ans=2*initialcount;
// if(limit%(a+b)>= a)
// ans++;
// return ans;
// }

int main()
{
        prag;
        ll T=1;
        cin>>T;
        while(T--)
        {

	      ll n;
          cin>>n;

          if(n%2==0) p1(n/2);
          else if(n==1) p1(1);
          else p1((n-1)/2);

        }

        return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ll long long
#define ld long double
ll const N=1e6+5;
ll const INF=8223372036854775807;

#define pb push_back
#define popb pop_back()
#define pf push_front
#define popf pop_front()
#define si size()
#define be begin()
#define en end()
#define all(v) v.be, v.en
#define len length()
#define mp make_pair
#define mt make_tuple
#define umap unordered_map
#define uset unordered_set
#define acc(v) accumulate(all(v), 0)
#define F first
#define S second

#define forz(i, n) for (ll i = 0; i < n; i++)
#define fore(i, m, n) for (ll i = m; i <= n; i++)
#define rforz(i, n) for (ll i = n - 1; i >= 0; i--)
#define rfore(i, m, n) for (ll i = n; i >= m; i--)
#define deci(n) fixed << setprecision(n)
#define high(n) __builtin_popcount(n)
#define highll(n) __builtin_popcountll(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define lb lower_bound
#define ub upper_bound
#define er equal_range
#define maxe *max_element
#define mine *min_element
#define mod 1000000007
#define mod2 998244353
#define PI 3.1415926535
#define gcd __gcd
#define prag ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)

#define endl "\n"
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c << endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << endl

typedef pair<ll,ll> pll;
typedef pair<pll,ll> plll;

/*
// GRAPHS
vector<ll> adj[N];

ll depth[N],sizz[N];
bool visited[N];
// ll clr[N];

void bfs(ll s,ll p){
    sizz[s]=1;
    visited[s]=true;

    for(auto x:adj[s]){
        if(x==p){
            continue;
        }

            if(visited[x]==false)
            {

            depth[x]=depth[s]+1;
            bfs(x,s);
            sizz[s]=sizz[s]+sizz[x];

            }

    }
}

*/

bool checkPrime(ll x)
{
    if (x == 1)
    {
        return false;
    }
    if (x <= 3)
    {
        return true;
    }
    ll t = 2;
    if (x % 2 == 0)
    {
        return false;
    }
    t = 3;
    for (t; t <= sqrt(x); t += 2)
    {
        if (x % t == 0)
        {
            return false;
        }
    }
    return true;
}

/// used for internal sorting in minpriority queue
template <class pll> struct greatter : binary_function <pll,pll,bool> {
  bool operator() (const pll& p1, const pll& p2) const
  {
    if(p2.S-p2.F>p1.S-p1.F) return true;
    else if(p2.S-p2.F==p1.S-p1.F)
    {
        if(p1.F>p2.F)  return true;
        else return false;
    }
    else return false;
  }
};

ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;

    while (y > 0)
    {

        if (y & 1)
            res = (res*x) % p;

        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}

ll modInverse(ll n, ll p)
{
    return power(n, p-2, p);
}

ll nCrModPFermat(ll n, ll r, ll p)
{

   if (r==0)
      return 1;

    ll fac[n+1];
    fac[0] = 1;
    for (ll i=1 ; i<=n; i++)
        fac[i] = fac[i-1]*i%p;

    return (fac[n] % p * modInverse(fac[r], p) % p* modInverse(fac[n-r], p) % p) % p;
}

// ll dp[3605][8005];
// ll countsubsets(vector<ll> arr,ll ss, ll i,ll remsum)
// {
//    if(i==ss)
//    {
//        if(remsum==0) return 1;
//        else return 0;
//    }

//    if(dp[i][remsum]!=-1) return dp[i][remsum];
//    else
//    {
//        dp[i][remsum]=countsubsets(arr,ss,i+1,remsum)+countsubsets(arr,ss,i+1,remsum-arr[i]);
//        return  dp[i][remsum];
//    }

// }

bool comp(char c1,char c2)
{
    if(c1>c2) return true;
    else return false;
}

// ll count(ll a, ll b, ll limit)
// {
// ll initialcount=limit/(a+b);
// ll ans=2*initialcount;
// if(limit%(a+b)>= a)
// ans++;
// return ans;
// }

int main()
{
        prag;
        ll T=1;
        cin>>T;
        while(T--)
        {

	      ll n,i;
          cin>>n;
          for(i=n;i>=1;i--)
          {
              if(!checkPrime(i))
              {
              for(ll j=2;j<=sqrt(n);j++)
                {  if(i%j==0)
                   {
                       ll k=max(j,n/j);
                       p1(k);

                   break;
                   }
                }
              break;
              }

          }

          if(i==1) p1(1);

        }

        return 0;

}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ll long long
#define ld long double
ll const N=1e6+5;
ll const INF=8223372036854775807;

#define pb push_back
#define popb pop_back()
#define pf push_front
#define popf pop_front()
#define si size()
#define be begin()
#define en end()
#define all(v) v.be, v.en
#define len length()
#define mp make_pair
#define mt make_tuple
#define umap unordered_map
#define uset unordered_set
#define acc(v) accumulate(all(v), 0)
#define F first
#define S second

#define forz(i, n) for (ll i = 0; i < n; i++)
#define fore(i, m, n) for (ll i = m; i <= n; i++)
#define rforz(i, n) for (ll i = n - 1; i >= 0; i--)
#define rfore(i, m, n) for (ll i = n; i >= m; i--)
#define deci(n) fixed << setprecision(n)
#define high(n) __builtin_popcount(n)
#define highll(n) __builtin_popcountll(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define lb lower_bound
#define ub upper_bound
#define er equal_range
#define maxe *max_element
#define mine *min_element
#define mod 1000000007
#define mod2 998244353
#define PI 3.1415926535
#define gcd __gcd
#define prag ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)

#define endl "\n"
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c << endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << endl

typedef pair<ll,ll> pll;
typedef pair<pll,ll> plll;

/*
// GRAPHS
vector<ll> adj[N];

ll depth[N],sizz[N];
bool visited[N];
// ll clr[N];

void bfs(ll s,ll p){
    sizz[s]=1;
    visited[s]=true;

    for(auto x:adj[s]){
        if(x==p){
            continue;
        }

            if(visited[x]==false)
            {

            depth[x]=depth[s]+1;
            bfs(x,s);
            sizz[s]=sizz[s]+sizz[x];

            }

    }
}

*/

bool checkPrime(ll x)
{
    if (x == 1)
    {
        return false;
    }
    if (x <= 3)
    {
        return true;
    }
    ll t = 2;
    if (x % 2 == 0)
    {
        return false;
    }
    t = 3;
    for (t; t <= sqrt(x); t += 2)
    {
        if (x % t == 0)
        {
            return false;
        }
    }
    return true;
}

/// used for internal sorting in minpriority queue
template <class pll> struct greatter : binary_function <pll,pll,bool> {
  bool operator() (const pll& p1, const pll& p2) const
  {
    if(p2.S-p2.F>p1.S-p1.F) return true;
    else if(p2.S-p2.F==p1.S-p1.F)
    {
        if(p1.F>p2.F)  return true;
        else return false;
    }
    else return false;
  }
};

ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;

    while (y > 0)
    {

        if (y & 1)
            res = (res*x) % p;

        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}

ll modInverse(ll n, ll p)
{
    return power(n, p-2, p);
}

ll nCrModPFermat(ll n, ll r, ll p)
{

   if (r==0)
      return 1;

    ll fac[n+1];
    fac[0] = 1;
    for (ll i=1 ; i<=n; i++)
        fac[i] = fac[i-1]*i%p;

    return (fac[n] % p * modInverse(fac[r], p) % p* modInverse(fac[n-r], p) % p) % p;
}

// ll dp[3605][8005];
// ll countsubsets(vector<ll> arr,ll ss, ll i,ll remsum)
// {
//    if(i==ss)
//    {
//        if(remsum==0) return 1;
//        else return 0;
//    }

//    if(dp[i][remsum]!=-1) return dp[i][remsum];
//    else
//    {
//        dp[i][remsum]=countsubsets(arr,ss,i+1,remsum)+countsubsets(arr,ss,i+1,remsum-arr[i]);
//        return  dp[i][remsum];
//    }

// }

bool comp(char c1,char c2)
{
    if(c1>c2) return true;
    else return false;
}

// ll count(ll a, ll b, ll limit)
// {
// ll initialcount=limit/(a+b);
// ll ans=2*initialcount;
// if(limit%(a+b)>= a)
// ans++;
// return ans;
// }

int main()
{
        prag;
        ll T=1;
        cin>>T;
        while(T--)
        {

	      ll n,i,k=INT_MIN;
          cin>>n;
          for(i=n;i>=1;i--)
          {

              for(ll j=2;j<=sqrt(i);j++)
                {  if(i%j==0)
                   {
                      ll p=max(j,i/j);
                      k=max(k,p);
                      break;

                   }
                }

          }

          if(k==INT_MIN) p1(1);
          else p1(k);

        }

        return 0;

}


#include<bits/stdc++.h>
using namespace std;

int GCD(int a,int b)
{
    int g=1;
    for(int i=2;i<=a;i++)
    {
        if(a%i==0 && b%i==0)
        {
            g=i;
        }
    }
    return g;
}

int main(){

    int t;
    cin>>t;
    while(t--)
    {
        int n,max=1;
        cin>>n;
        for(int i=1;i<n;i++)
        {
            for (int j = i+1; j <= n; j++)
            {
                int g = GCD(i,j);
                if(g>max)
                {
                    max=g;
                }
            }
        }
        cout<<max<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int max=1;
void divisors(int n)
{
    for(int i=2;i<n;i++)
    {
        if(n%i==0)
        {
            if(i>::max)
            {
                ::max=i;
            }
        }
    }
    for(int i=2;i<(n-1);i++)
    {
        if((n-1)%i==0)
        {
            if(i>::max)
            {
                ::max=i;
            }
        }
    }
    cout<<::max<<"\n";
}
int main(){
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        divisors(n);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main(){

    int t;
    cin>>t;
    while(t--)
    {
        int n,max=1;
        cin>>n;
        for(int i=1;i<n;i++)
        {
            for (int j = i+1; j <= n; j++)
            {
                int g = __gcd(i,j);
                if(g>max)
                {
                    max=g;
                }
            }
        }
        cout<<max<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int max=1;
void divisors(long long int n)
{
    for(long long int i=2;i<n;i++)
    {
        if(n%i==0)
        {
            if(i>::max)
            {
                ::max=i;
            }
        }
    }
    for(long long int i=2;i<(n-1);i++)
    {
        if((n-1)%i==0)
        {
            if(i>::max)
            {
                ::max=i;
            }
        }
    }
    cout<<::max<<"\n";
}
int main(){
    long long int t;
    cin>>t;
    while(t--)
    {
        long long int n;
        cin>>n;
        divisors(n);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int GCD(int a,int b)
{
    int g=1;
    for(int i=2;i<=a;i++)
    {
        if(a%i==0 && b%i==0)
        {
            g=i;
        }
    }
    return g;
}

int main(){

    int t;
    cin>>t;
    while(t--)
    {
        int n,max=1;
        cin>>n;
        for(int i=2;i<n;i++)
        {
            for (int j = i+1; j <= n; j++)
            {
                int g = GCD(i,j);
                if(g>max)
                {
                    max=g;
                }
            }
        }
        cout<<max<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        cout<<n/2<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
vector<ll> nos;

int main(){

    ll t,n,a,b;
	t=1;
    cin>>t;

    nos=vector<ll> (100001,0);

    vector<ll> pr;

    for(ll i=2;i<100001;i++){
        if(nos[i]==0){
            pr.push_back(i);
            for(ll j=2;(j*i)<100001;j++){
                nos[i*j]++;
            }

        }
    }

	while(t--){

       cin>>n;
       ll ans=1;

       for(ll i=1;i<=n;i++){
          for(auto j:pr){
            if(i*j <= n){
                ans=max(ans,i);
            }else{
                break;
            }
          }
       }
       cout<<ans<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
vector<ll> nos;

int main(){

    ll t,n,a,b;
	t=1;
    cin>>t;

    nos=vector<ll> (100001,0);

    vector<ll> pr;

    for(ll i=2;i<100001;i++){
        if(nos[i]==0){
            pr.push_back(i);
            for(ll j=2;(j*i)<100001;j++){
                nos[i*j]++;
            }

        }
    }

	while(t--){

       cin>>n;
       ll ans=1;

       for(ll i=(n/2) +1 ;i>=1;i--){
            if(nos[i]>0){
                continue;
            }else{
                if(i*2<=n){
                    ans=i;
                    break;
                }
            }
       }

       cout<<ans<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int

int main(){

    ll t,n,a,b;
	t=1;
    cin>>t;

	while(t--){

       cin>>n;

       ll h=n;
       vector<ll> div(h+1,1);
        ll ans=0;
        ll sm=1;
       for(ll i=1;i<=n;i++){
            for(ll j=1;j<(n/i);j++){
                ans=ans+div[i*j];
                if(ans>=2){
                    sm=max(sm,i);
                }
            }
       }

       cout<<sm<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int
vector<ll> nos;

int main(){

    ll t,n,a,b;
	t=1;
    cin>>t;

    nos=vector<ll> (100001,0);

    vector<ll> pr;

    for(ll i=2;i<100001;i++){
        if(nos[i]==0){
            pr.push_back(i);
            for(ll j=2;(j*i)<100001;j++){
                nos[i*j]++;
            }

        }
    }

	while(t--){

       cin>>n;
       ll ans=1;

       for(ll i=1;i<=n;i++){
          for(auto j:pr){
            if(i*j <= n){
                ans=max(ans,i);
            }
          }
       }
       cout<<ans<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int

int main(){

    ll t,n,a,b;
	t=1;
    cin>>t;

	while(t--){

       cin>>n;

       ll h=n;
       vector<ll> div(h+1,1);
        ll ans=1;
        ll sm=0;
       for(ll i=1;i<=n;i++){
            for(ll j=1;j<(n/i);j++){
                ans=ans+div[i*j];
                if(ans>=2){
                    sm=max(sm,i);
                }
            }
       }

       cout<<sm<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long int

int main(){

    ll t,n,a,b;
	t=1;
    cin>>t;

	while(t--){

       cin>>n;

       ll h=n;
       vector<ll> div(h+1,1);
        ll ans=0;
        ll sm=0;
       for(ll i=1;i<=n;i++){
            for(ll j=1;j<(n/i);j++){
                ans=ans+div[i*j];
                if(ans>=2){
                    sm=max(sm,i);
                }
            }
       }

       cout<<sm<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;
int main()  {
   int t;
   cin>>t;
   while(t--)
   {
    int n;
    cin>>n;
    int _max = 1;
    for(int i = 1; i < n; i++)
    {
        for(int j =i+1; j < n; j++)
        {
            _max = max(_max,__gcd(i,j));
        }
    }
    cout<<_max<<"\n";
   }
}


#include<bits/stdc++.h>
using namespace std;
int main()  {
   int t;
   cin>>t;
   while(t--)
   {
    int n;
    cin>>n;
    int _max = INT_MIN;
    for(int i = 1; i < n; i++)
    {
        for(int j =i+1; j < n; j++)
        {
            _max = max(_max,__gcd(i,j));
        }
    }
    cout<<_max<<"\n";
   }
}


#include<bits/stdc++.h>
using namespace std;
int main()  {
   int t;
   cin>>t;
   while(t--)
   {
    int n;
    cin>>n;
    int _max = 1;
    for(int i = 1; i < n; i++)
    {
        for(int j =1; j < n,i!=j; j++)
        {
            _max = max(_max,__gcd(i,j));
        }
    }
    cout<<_max<<"\n";
   }
}


#include<bits/stdc++.h>
using namespace std;
int main()  {
   int t;
   cin>>t;
   while(t--)
   {
    int n;
    cin>>n;
    int _max = 1;
    if(n>=2)    _max=floor(n/2);
    cout<<_max<<"\n";
   }
}


#include<bits/stdc++.h>
using namespace std;
int main()  {
    int n;
    cin>>n;
    int _max = INT_MIN;
    for(int i = 1; i < n; i++)
    {
        for(int j =i+1; j < n; j++)
        {
            _max = max(_max,__gcd(i,j));
        }
    }
    cout<<_max;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

bool is_prime(long long n) {  // is n prime or not
    for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    int ans = 1;

    for (int b = n; b >= 2; b--) {
        if (is_prime(b)) continue;

        for (int a = 1; a < b; a++) {
            ans = max(gcd(a, b), ans);
        }
        break;
    }

    cout << ans << endl;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

constexpr bool isPrime(int x) {
    if (x < 1) return false;
    if (x == 1) return false;
    for (int i = 2; i * i <= x; i++) {
        if (x % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    // n以下の素数ではない最大の数が答え
    int ans = 1;

    for (int b = 1; b <= n; b++) {
        if (isPrime(b)) continue;

        for (int a = 1; a * a <= b; a++) {
            const int val = gcd(a, b);
            ans = max(val, ans);
        }
    }

    cout << ans << endl;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

bool is_prime(long long n) {  // is n prime or not
    for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    // n以下の素数ではない最大の数が答え
    int ans = 1;

    for (int b = 3; b <= n; b++) {
        if (is_prime(b)) continue;

        for (int a = 2; a * a <= b && a < b; a++) {
            if (b % a == 0) {
                ans = max(gcd(b, a), ans);
                ans = max(gcd(b, b / a), ans);
            }
        }
    }

    cout << ans << endl;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

bool is_prime(long long n) {  // is n prime or not
    for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    int ans = max(n / 2, (long long)1);

    cout << ans << endl;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

bool is_prime(long long n) {  // is n prime or not
    for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    // n以下の素数ではない最大の数が答え
    int ans = 1;

    for (int i = 1; i <= n; i++) {
        if (is_prime(i)) continue;

        for (int j = 1; j * j <= i && j < i; j++) {
            if (i % j == 0) {
                ans = max(gcd(i, j), ans);
                ans = max(gcd(i / j, i), ans);
            }
        }
    }

    cout << ans << endl;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

constexpr bool isPrime(int x) {
    if (x < 1) return false;
    if (x == 1) return false;
    for (int i = 2; i * i <= x; i++) {
        if (x % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    // n以下の素数ではない最大の数が答え
    int ans = 1;

    for (int b = 1; b <= n; b++) {
        if (isPrime(b)) continue;

        for (int a = 1; a * a <= b && a < b; a++) {
            const int val = gcd(a, b);
            ans = max(val, ans);
        }
    }

    cout << ans << endl;
}


#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

bool is_prime(long long n) {  // is n prime or not
    for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return true;
}

void solve();

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        solve();
    }
}

void solve() {
    int n;
    cin >> n;

    int ans = 1;

    for (int b = 2; b <= n; b++) {
        for (int a = 1; a * a <= b && a < b; a++) {
            ans = max(gcd(a, b), ans);
            if (b % a == 0) {
                const int aa = b / a;
                if (aa != b) {
                    ans = max(gcd(aa, b), ans);
                }
            }
        }
    }

    cout << ans << endl;
}


#include <bits/stdc++.h>
using namespace std;

int findGCD(int arr[], int n)
{

	int high = 0;
	for (int i = 0; i < n; i++)
		high = max(high, arr[i]);

	int count[high + 1] = {0};
	for (int i = 0; i < n; i++)
		count[arr[i]]++;

	int counter = 0;

	for (int i = high; i >= 1; i--)
	{
		int j = i;
	counter = 0;

		while (j <= high)
		{

			if(count[j] >=2)
			return j;

		else if (count[j] == 1)
				counter++;

			j += i;

			if (counter == 2)
				return i;
		}
	}
}

int main()
{

	int T;
	cin >>T;
	while(T--)
	{
		int n;
		cin >> n;
		int arr[n];
		memset(arr,0,sizeof(arr));

		for (int i = 1; i <= n; ++i)
		{
			arr[i]=i;
		}

	cout << findGCD(arr, n)<<endl;

	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int findMaxGCD(int arr[], int n)
{

	int high = 0;
	for (int i = 0; i < n; i++)
		high = max(high, arr[i]);

	int count[high + 1] = {0};
	for (int i = 0; i < n; i++)
		count[arr[i]]++;
	int counter = 0;

	for (int i = high; i >= 1; i--)
	{
		int j = i;
	counter = 0;

		while (j <= high)
		{

			if(count[j] >=2)
			return j;

		else if (count[j] == 1)
				counter++;

			j += i;

			if (counter == 2)
				return i;
		}
	}
}

int main()
{
	int T;
	cin >> T;
	while(T--)
	{
		int n;
		cin>>n;

	int arr[n];
	memset(arr,0,sizeof(arr));
	arr[0]=1;
	for (int i = 1; i <= n; ++i)
	{
		arr[i] = i+1;
	}

	cout << findMaxGCD(arr,n)<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int findMaxGCD(int arr[], int n)
{

	int high = 0;
	for (int i = 0; i < n; i++)
		high = max(high, arr[i]);

	int divisors[high + 1] = { 0 };

	for (int i = 0; i < n; i++)
	{

		for (int j = 1; j <= sqrt(arr[i]); j++)
		{

			if (arr[i] % j == 0)
			{

				divisors[j]++;

				if (j != arr[i] / j)
					divisors[arr[i] / j]++;
			}
		}
	}

	for (int i = high; i >= 1; i--)

		if (divisors[i] > 1)
			return i;
}

// Driver code
int main()
{
	int T;
	cin >> T;
	while(T--)
	{
		int n;
	cin>>n;

	int arr[n];
	memset(arr,0,sizeof(arr));
	for (int i = 1; i <= n; ++i)
	{
		arr[i] = i;
	}
	cout << findMaxGCD(arr,n)<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
	int T;
	cin >> T;
	while(T--)
	{
	int n;
	cin>>n;

		if(n%2==0)
		cout << (n/2)-1<<endl;
	else
		cout<<n/2<<endl;
	}
	return 0;
}


/***** author :  C0d1ngPhenomena *****/

    #include <bits/stdc++.h>
    #include <cstdio>
    #include <cstring>
    #include <cmath>
    #include <cstring>
    #include <chrono>
    #include <complex>
    #define endl "\n"
    #define ll long long int
    #define vi vector<int>
    #define vll vector<ll>
    #define vvi vector < vi >
    #define pii pair<int,int>
    #define pll pair<long long, long long>
    #define mod 1000000007
    #define inf 1000000000000000001;
    #define all(c) c.begin(),c.end()
    #define mp(x,y) make_pair(x,y)
    #define mem(a,val) memset(a,val,sizeof(a))
    #define eb emplace_back
    #define f first
    #define s second
    #define pb push_back

    using namespace std;

    bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}
    int main()
    {
        std::ios::sync_with_stdio(false);
        cin.tie(NULL);
        int T;
        cin>>T;

        while(T--)
        {
        	int n;
        	cin >> n;
       		ll flag=0;

       		if(n==2)
       		{
       			cout<<1<<endl;
       			continue;
       		}

       		if(!isPrime(n))
       		{
       			for(int i = ceil(log2(n)); i <= n ;i++)
       			{
       				if(i!=0)
       				if(n%i==0)
       				{

       					cout<<min(n/i,i)<<endl;
       					flag = 1;
       					break;
       				}
       			}

       		}
       		else
       		{
       			for(int i = ceil((int)log2(n)); i <= n-1 ;i++)
       			{
       				if(i!=0)
       				if((n-1)%i==0 )
       				{

       					cout<<min((n-1)/i,i)<<endl;
       					flag = 1;
       					break;
       				}
       			}

       		}

       		if(!flag)
       			cout<<1<<endl;

        }
        return 0;
    }


#include <bits/stdc++.h>

using namespace std;

int findMaxGCD(int arr[], int n)
{

	int high = 0;
	for (int i = 0; i < n; i++)
		high = max(high, arr[i]);

	int divisors[high + 1] = { 0 };

	for (int i = 0; i < n; i++)
	{

		for (int j = 1; j <= sqrt(arr[i]); j++)
		{

			if (arr[i] % j == 0)
			{

				divisors[j]++;

				if (j != arr[i] / j)
					divisors[arr[i] / j]++;
			}
		}
	}

	for (int i = high; i >= 1; i--)

		if (divisors[i] > 1)
			return i;
}

// Driver code
int main()
{
	int T;
	cin >> T;
	while(T--)
	{
		int n;
		cin>>n;

	int arr[n];
	memset(arr,0,sizeof(arr));
	arr[0]=1;
	for (int i = 1; i <= n; ++i)
	{
		arr[i] = i+1;
	}

	cout << findMaxGCD(arr,n)<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
#include <iostream>
#include <cmath>
using namespace std;
int getMaxGCD(int arr[], int n) {
   int high = 0;
   for (int i = 0; i < n; i++)
   high = max(high, arr[i]);
   int divisors[high + 1] = { 0 }; //array to store all gcd values
   for (int i = 0; i < n; i++) {
      for (int j = 1; j <= sqrt(arr[i]); j++) {
         if (arr[i] % j == 0) {
            divisors[j]++;
         if (j != arr[i] / j)
            divisors[arr[i] / j]++;
         }
      }
   }
   for (int i = high; i >= 1; i--)
   if (divisors[i] > 1)
   return i;
}
int main() {
	int T;
	cin >> T;
	while(T--)
	{
			int n;
	cin >> n;
	int arr[n];
	memset(arr,0,sizeof(arr));
	for (int i = 1; i <=n; ++i)
	{
		arr[i]=i;
	}

   cout << getMaxGCD(arr,n)<<endl;

	}
	return 0;

}


/***** author :  C0d1ngPhenomena *****/

    #include <bits/stdc++.h>
    #include <cstdio>
    #include <cstring>
    #include <cmath>
    #include <cstring>
    #include <chrono>
    #include <complex>
    #define endl "\n"
    #define ll long long int
    #define vi vector<int>
    #define vll vector<ll>
    #define vvi vector < vi >
    #define pii pair<int,int>
    #define pll pair<long long, long long>
    #define mod 1000000007
    #define inf 1000000000000000001;
    #define all(c) c.begin(),c.end()
    #define mp(x,y) make_pair(x,y)
    #define mem(a,val) memset(a,val,sizeof(a))
    #define eb emplace_back
    #define f first
    #define s second
    #define pb push_back

    using namespace std;
    int main()
    {
        std::ios::sync_with_stdio(false);
        cin.tie(NULL);
        int T;
        cin>>T;

        while(T--)
        {
        	int n;
        	cin >>n;
        	ll gcdans = (ll)log2(n);
        	cout<<gcdans<<endl;

        }
        return 0;
    }


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;

    while (t--)
    {
        int n;
        cin >> n;

        int answer = 1;

        for (int i = n; i > 0 and answer == 1; i--)
            for (int j = i - 1; j > 0 and answer == 1; j--)
                if (i % j == 0)
                    answer = j;

        cout << answer << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;

    while (t--)
    {
        int n;
        cin >> n;
        cout << n / 2 << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;

    while (t--)
    {
        int n;
        cin >> n;

        int answer = 1;

        for (int i = n; i > 0 and answer == 1; i--)
            for (int j = n - 1; j > 0 and answer == 1; j--)
                if (i % j == 0)
                    answer = j;

        cout << answer << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;

    while (t--)
    {
        int n;
        cin >> n;

        int answer = 1;

        for (int i = n; i > 0 and answer == 1; i--)
            for (int j = n / 2; j > 0 and answer == 1; j--)
                if (i % j == 0)
                    answer = j;

        cout << answer << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;

    while (t--)
    {
        int n;
        cin >> n;

        int answer = 1;

        for (int i = n; i > 0; i--)
            for (int j = i - 1; j > 0; j--)
                if (i % j == 0)
                    answer = max(answer, j);

        cout << answer << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;

    while (t--)
    {
        int n;
        cin >> n;

        int answer = 1;

        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= n; j++)
                if (i != j)
                    answer = max(answer, __gcd(i, j));

        cout << answer << endl;
    }
    return 0;
}


#include "bits/stdc++.h" // template by Benq
using namespace std; // Debug template credit: Benq, ramchandra

using ll = long long;
using ld = long double;

using pi = pair<int, int>;
using pl = pair<long long, long long>;
using pd = pair<long double, long double>;

using vi = vector<int>;
using vl = vector<long long>;
using vs = vector<string>;
using vpi = vector<pair<int, int>>;
using vpl = vector<pair<long long, long long>>;
using vpd = vector<pair<double, double>>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define f first
#define s second
#define si(s) ((int)(s).size())
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define rs resize
#define ins insert
#define nl "\n"
#define uni(x) sort((x).begin(), (x).end()); (x).erase(unique((x).begin(), (x).end()), (x).end())
#define trav(i, x) for(auto& i: x)

const long long INF = 1e18;
const long double PI = acos((long double)-1);
const long long MOD = 998244353;

template<class A> void re(complex<A>& c);
template<class A, class B> void re(pair<A, B>& p);
template<class A> void re(vector<A>& v);
template<class A, size_t SZ> void re(array<A, SZ>& a);

template<class T> void re(T& x) { cin >> x; }
void re(double& d) { string t; re(t); d = stod(t); }
void re(long double& d) { string t; re(t); d = stold(t); }
template<class H, class... T> void re(H& h, T&... t) { re(h); re(t...); }

template<class A> void re(complex<A>& c) { A a, b; re(a, b); c = {a, b}; }
template<class A, class B> void re(pair<A, B>& p) { re(p.first, p.second); }
template<class A> void re(vector<A>& x) { for(auto& i: x) re(i); }
template<class A, size_t SZ> void re(array<A, SZ>& x) { for(auto& i: x) re(i); }

#define ts to_string
string ts(char c) { return string(1, c); }
string ts(bool b) { return b ? "true" : "false"; }
string ts(const char* s) { return (string)s; }
string ts(string s) { return s; }
template<class A> string ts(complex<A> c) {
	stringstream ss; ss << c; return ss.str(); }
string ts(vector<bool> v) {
	string res = "{"; for(int i = 0; i < si(v); ++i) res += char('0' + v[i]);
	res += "}"; return res; }
template<size_t SZ> string ts(bitset<SZ> b) {
	string res = ""; for(int i = 0; i < SZ; ++i) res += char('0' + b[i]);
	return res; }
template<class A, class B> string ts(pair<A,B> p);
template<class T> string ts(T v) { // containers with begin(), end()
	bool fst = 1; string res = "{";
	for (const auto& x: v) {
		if (!fst) res += ", ";
		fst = 0; res += ts(x);
	}
	res += "}"; return res;
}
template<class A, class B> string ts(pair<A,B> p) {
	return "(" + ts(p.f) + ", " + ts(p.s) + ")"; }

// DEBUG
void DBG() { cerr << "]" << endl; }
template<class H, class... T> void DBG(H h, T... t) {
	cerr << ts(h); if (sizeof...(t)) cerr << ", ";
	DBG(t...); }
void EDBG(string names) { names = names; }
template<class H, class... T> void EDBG(string names, H h, T... t) {
	auto pos = names.find(',');
	auto first_name = names.substr(0, pos);
	auto rest = names.substr(pos + 1);
	while(rest.front() == ' '){
		rest = rest.substr(1);
	}
	cerr << "[" << first_name << "]: [" << ts(h) << "]" << nl;
	EDBG(rest, t...);
}

#ifdef LOCAL
#define dbg(...) cerr << "[" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#define edbg(...) EDBG(#__VA_ARGS__, __VA_ARGS__)
#else
#define dbg(...) 0
#define edbg(...) 0
#endif

void pr() {}
template <typename H, typename... T>
void pr(H var1, T... var2) {
    cout << var1;
    pr(var2...);
}

void ps() { cout << nl; }
template<typename H, typename... T>
void ps(H var1, T... var2) {
	cout << var1 << ' ';
	ps(var2...);
}

void CowGoesMoo() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(20); }
void setIO(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); }
ll gld(ll a, ll b) { return (a - (a % b)); } // returns the greatest number less than or equal to a and divides b evenly
ll cdiv(ll a, ll b) { return a / b + !(a < 0 || a % b == 0); }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a / (gcd(a, b)) * b); }
ll pow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = res * a % MOD; a = a * a % MOD; b >>= 1; } return res; }

void solve() {
	int n;
	re(n);
	ps((n + 1) / 2 * 2 / 2 * 2 / 2);
}

int main() {
	CowGoesMoo();

	int t;
	re(t);
	while(t--) {
		solve();
	}
}


#include "bits/stdc++.h"
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int t;
    cin >> t;
    while(t--) {
        int n;
        cin >> n;
        cout << n / 2 << "\n";
    }
}


#include "bits/stdc++.h" // template by Benq
using namespace std; // Debug template credit: Benq, ramchandra

using ll = long long;
using ld = long double;

using pi = pair<int, int>;
using pl = pair<long long, long long>;
using pd = pair<long double, long double>;

using vi = vector<int>;
using vl = vector<long long>;
using vs = vector<string>;
using vpi = vector<pair<int, int>>;
using vpl = vector<pair<long long, long long>>;
using vpd = vector<pair<double, double>>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define f first
#define s second
#define si(s) ((int)(s).size())
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define rs resize
#define ins insert
#define nl "\n"
#define uni(x) sort((x).begin(), (x).end()); (x).erase(unique((x).begin(), (x).end()), (x).end())
#define trav(i, x) for(auto& i: x)

const long long INF = 1e18;
const long double PI = acos((long double)-1);
const long long MOD = 998244353;

template<class A> void re(complex<A>& c);
template<class A, class B> void re(pair<A, B>& p);
template<class A> void re(vector<A>& v);
template<class A, size_t SZ> void re(array<A, SZ>& a);

template<class T> void re(T& x) { cin >> x; }
void re(double& d) { string t; re(t); d = stod(t); }
void re(long double& d) { string t; re(t); d = stold(t); }
template<class H, class... T> void re(H& h, T&... t) { re(h); re(t...); }

template<class A> void re(complex<A>& c) { A a, b; re(a, b); c = {a, b}; }
template<class A, class B> void re(pair<A, B>& p) { re(p.first, p.second); }
template<class A> void re(vector<A>& x) { for(auto& i: x) re(i); }
template<class A, size_t SZ> void re(array<A, SZ>& x) { for(auto& i: x) re(i); }

#define ts to_string
string ts(char c) { return string(1, c); }
string ts(bool b) { return b ? "true" : "false"; }
string ts(const char* s) { return (string)s; }
string ts(string s) { return s; }
template<class A> string ts(complex<A> c) {
	stringstream ss; ss << c; return ss.str(); }
string ts(vector<bool> v) {
	string res = "{"; for(int i = 0; i < si(v); ++i) res += char('0' + v[i]);
	res += "}"; return res; }
template<size_t SZ> string ts(bitset<SZ> b) {
	string res = ""; for(int i = 0; i < SZ; ++i) res += char('0' + b[i]);
	return res; }
template<class A, class B> string ts(pair<A,B> p);
template<class T> string ts(T v) { // containers with begin(), end()
	bool fst = 1; string res = "{";
	for (const auto& x: v) {
		if (!fst) res += ", ";
		fst = 0; res += ts(x);
	}
	res += "}"; return res;
}
template<class A, class B> string ts(pair<A,B> p) {
	return "(" + ts(p.f) + ", " + ts(p.s) + ")"; }

// DEBUG
void DBG() { cerr << "]" << endl; }
template<class H, class... T> void DBG(H h, T... t) {
	cerr << ts(h); if (sizeof...(t)) cerr << ", ";
	DBG(t...); }
void EDBG(string names) { names = names; }
template<class H, class... T> void EDBG(string names, H h, T... t) {
	auto pos = names.find(',');
	auto first_name = names.substr(0, pos);
	auto rest = names.substr(pos + 1);
	while(rest.front() == ' '){
		rest = rest.substr(1);
	}
	cerr << "[" << first_name << "]: [" << ts(h) << "]" << nl;
	EDBG(rest, t...);
}

#ifdef LOCAL
#define dbg(...) cerr << "[" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#define edbg(...) EDBG(#__VA_ARGS__, __VA_ARGS__)
#else
#define dbg(...) 0
#define edbg(...) 0
#endif

void pr() {}
template <typename H, typename... T>
void pr(H var1, T... var2) {
    cout << var1;
    pr(var2...);
}

void ps() { cout << nl; }
template<typename H, typename... T>
void ps(H var1, T... var2) {
	cout << var1 << ' ';
	ps(var2...);
}

void CowGoesMoo() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(20); }
void setIO(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); }
ll gld(ll a, ll b) { return (a - (a % b)); } // returns the greatest number less than or equal to a and divides b evenly
ll cdiv(ll a, ll b) { return a / b + !(a < 0 || a % b == 0); }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a / (gcd(a, b)) * b); }
ll pow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = res * a % MOD; a = a * a % MOD; b >>= 1; } return res; }

void solve() {
	int n;
	re(n);
	ps((n + 1) / 2 * 2 / 2 * 2 / 2)
}

int main() {
	CowGoesMoo();

	int t;
	re(t);
	while(t--) {
		solve();
	}
}


#include <iostream>
using namespace std;

int main() {
    int t;
    cin >> t;
    while(t--) {
        int n;
        cin >> n;
        cout << n * 3 / 3 * 2 << endl;
}
}


#include <iostream>
using namespace std;

int main() {
    int t;
    cin >> t;
    while(t--) {
        int n;
        cin >> n;
        cout << n * 3 / 3 / 2 << endl;
}
}


#include "bits/stdc++.h"
using namespace std;

using ll = long long;
using ld = long double;
using db = double;
using str = string;

using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;

using vi = vector<int>;
using vl = vector<long long>;
using vd = vector<double>;
using vs = vector<string>;
using vld = vector<long double>;
using vpi = vector<pair<int, int>>;
using vpl = vector<pair<long long, long long>>;
using vpd = vector<pair<double, double>>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;

#define mp make_pair
#define f first
#define s second
#define si(x) ((int)(x).size())
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define rs resize
#define ins insert
#define ft front()
#define bk back()
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define nl "\n"
#define trav(i, x) for (auto& i: x)

const int MOD = 998244353;
const int MX = 5005;
const ll INF = 1e18;
const ld PI = acos((ld)-1);
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());

ll lcm(ll a, ll b) { return (a / (gcd(a, b)) * b); }
ll gcd(ll a,ll b) { return b ? gcd(b, a % b) : a; }
ll pow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = res * a; a = a * a; b >>= 1; } return res; }

void solve() {
	int n;
	cin >> n;
	int ans = -1;
	for(int i = n; i >= 1; --i) {
		if(i % 2 == 0) {
			if(i % 4 == 0) {
				ans = i;
				break;
			}
		}
	}
	cout << (ans == -1 ? 1 : ans / 2) << nl;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int t;
	cin >> t;
	while(t--) {
		solve();
	}
}


/*********************************************************************|
|---------|    /\  ....                  ....                         |
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |
                                                                      |
**********************************************************************/
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int >
#define pll pair < ll, ll >
#define xx first
#define yy second
#define vi vector < int >
#define vl vector < ll >
#define vp vector < pii >
#define inf  100000000
#define f(i, c, n) for(int i = c; i < n; i++)
#define fe(i, c, n) for(int i = c; i <= n; i++)
#define fr(i, n, c) for(int i = n - 1; i >= c; i--)
#define vbe(a) a.begin(), a.end()
#define vsort(a) sort(a.begin(), a.end())
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))
#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define S " "
#define N "\n"

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

// int convert_str_to_int(string s) {
//     stringstream str(s);
//     int x = 0;
//     str >> x;
//     return x;
// }
// void bin(int num) {
//  if(num == 0) return;
//  if(num % 2 == 0) {
//      x.pb(0);
//      num /= 2;
//  } else {
//      num /= 2;
//      x.pb(1);
//  }
//  bin(num);
// }

/********************|
                     |
   START HERE        |
                     |
*********************/

void solve() {

    int n;
    cin >> n;

    int nn = sqrt(n) - 1;
    int is_prime[n + 2];
    mem(is_prime);
    vi prime;

    for(int i = 2; i * i <= n; i++) {
        for(int j = i * i; j <= n; j += i) {
            if(is_prime[j] == 0) {
                is_prime[j] = 1;
            }
        }
    }
    int ans = 0;
    fe(i, 2, nn) {
        if(is_prime[i] == 0) {
            ans = i;
        }
    }
    if(ans == 0) {
        cout << "1" << N; return;
    }
    cout << ans << N;

}

int main() {

    int t; cin >> t; while(t--)
    solve();
}


/*********************************************************************|
|---------|    /\  ....                  ....                         |
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |
                                                                      |
**********************************************************************/
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int >
#define pll pair < ll, ll >
#define xx first
#define yy second
#define vi vector < int >
#define vl vector < ll >
#define vp vector < pii >
#define inf  100000000
#define f(i, c, n) for(int i = c; i < n; i++)
#define fe(i, c, n) for(int i = c; i <= n; i++)
#define fr(i, n, c) for(int i = n - 1; i >= c; i--)
#define vbe(a) a.begin(), a.end()
#define vsort(a) sort(a.begin(), a.end())
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))
#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define S " "
#define N "\n"

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

// int convert_str_to_int(string s) {
//     stringstream str(s);
//     int x = 0;
//     str >> x;
//     return x;
// }
// void bin(int num) {
//  if(num == 0) return;
//  if(num % 2 == 0) {
//      x.pb(0);
//      num /= 2;
//  } else {
//      num /= 2;
//      x.pb(1);
//  }
//  bin(num);
// }

/********************|
                     |
   START HERE        |
                     |
*********************/

void solve() {

    int n;
    cin >> n;

    int nn = sqrt(n);
    int is_prime[n + 2];
    mem(is_prime);
    vi prime;

    for(int i = 2; i * i <= n; i++) {
        for(int j = i * i; j <= n; j += i) {
            if(is_prime[j] == 0) {
                is_prime[j] = 1;
            }
        }
    }
    int ans = 0;
    fe(i, 2, nn) {
        if(is_prime[i] == 0 and (i * i) != n) {
            ans = i;
        }
    }
    if(ans == 0) {
        cout << "1" << N; return;
    }
    cout << ans << N;

}

int main() {

    int t; cin >> t; while(t--)
    solve();
}


/*********************************************************************|
|---------|    /\  ....                  ....                         |
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |
                                                                      |
**********************************************************************/
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int >
#define pll pair < ll, ll >
#define xx first
#define yy second
#define vi vector < int >
#define vl vector < ll >
#define vp vector < pii >
#define inf  100000000
#define f(i, c, n) for(int i = c; i < n; i++)
#define fe(i, c, n) for(int i = c; i <= n; i++)
#define fr(i, n, c) for(int i = n - 1; i >= c; i--)
#define vbe(a) a.begin(), a.end()
#define vsort(a) sort(a.begin(), a.end())
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))
#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define S " "
#define N "\n"

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

// int convert_str_to_int(string s) {
//     stringstream str(s);
//     int x = 0;
//     str >> x;
//     return x;
// }
// void bin(int num) {
//  if(num == 0) return;
//  if(num % 2 == 0) {
//      x.pb(0);
//      num /= 2;
//  } else {
//      num /= 2;
//      x.pb(1);
//  }
//  bin(num);
// }

/********************|
                     |
   START HERE        |
                     |
*********************/
int is_prime[1000002];

void solve() {

    ll n;
    cin >> n;

    for(ll i = 2; i * i <= n; i++) {
        for(ll j = i * i; j <= n; j += i) {
            if(is_prime[j] == 0) {
                is_prime[j] = 1;
            }
        }
    }
    int ans = 1;

    fe(i, 2, n) {
        if(is_prime[i] == 0) {
            if(i * 2 <= n) ans = i;
        }
    }
    cout << ans  << N;

}

int main() {

    int t; cin >> t; while(t--)
    solve();
}


/*********************************************************************|
|---------|    /\  ....                  ....                         |
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |
                                                                      |
**********************************************************************/
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int >
#define pll pair < ll, ll >
#define xx first
#define yy second
#define vi vector < int >
#define vl vector < ll >
#define vp vector < pii >
#define inf  100000000
#define f(i, c, n) for(int i = c; i < n; i++)
#define fe(i, c, n) for(int i = c; i <= n; i++)
#define fr(i, n, c) for(int i = n - 1; i >= c; i--)
#define vbe(a) a.begin(), a.end()
#define vsort(a) sort(a.begin(), a.end())
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))
#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define S " "
#define N "\n"

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

// int convert_str_to_int(string s) {
//     stringstream str(s);
//     int x = 0;
//     str >> x;
//     return x;
// }
// void bin(int num) {
//  if(num == 0) return;
//  if(num % 2 == 0) {
//      x.pb(0);
//      num /= 2;
//  } else {
//      num /= 2;
//      x.pb(1);
//  }
//  bin(num);
// }

/********************|
                     |
   START HERE        |
                     |
*********************/

void solve() {

    int n;
    cin >> n;

    int nn = sqrt(n);
    int is_prime[n + 2];
    mem(is_prime);
    vi prime;

    for(int i = 2; i * i <= n; i++) {
        for(int j = i * i; j <= n; j += i) {
            if(is_prime[j] == 0) {
                is_prime[j] = 1;
            }
        }
    }
    int ans = 1;
    fe(i, 0, n) {
        if(is_prime[i] == 0) {
            if(i * 2 <= n) ans = i;
            else break;
        }
    }
    cout << ans  << N;

}

int main() {

    int t; cin >> t; while(t--)
    solve();
}


/*********************************************************************|
|---------|    /\  ....                  ....                         |
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |
                                                                      |
**********************************************************************/
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int >
#define pll pair < ll, ll >
#define xx first
#define yy second
#define vi vector < int >
#define vl vector < ll >
#define vp vector < pii >
#define inf  100000000
#define f(i, c, n) for(int i = c; i < n; i++)
#define fe(i, c, n) for(int i = c; i <= n; i++)
#define fr(i, n, c) for(int i = n - 1; i >= c; i--)
#define vbe(a) a.begin(), a.end()
#define vsort(a) sort(a.begin(), a.end())
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))
#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define S " "
#define N "\n"

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

// int convert_str_to_int(string s) {
//     stringstream str(s);
//     int x = 0;
//     str >> x;
//     return x;
// }
// void bin(int num) {
//  if(num == 0) return;
//  if(num % 2 == 0) {
//      x.pb(0);
//      num /= 2;
//  } else {
//      num /= 2;
//      x.pb(1);
//  }
//  bin(num);
// }

/********************|
                     |
   START HERE        |
                     |
*********************/

void solve() {

    int n;
    cin >> n;

    int nn = sqrt(n);
    int is_prime[n + 2];
    mem(is_prime);
    vi prime;

    for(int i = 2; i * i <= n; i++) {
        for(int j = i * i; j <= n; j += i) {
            if(is_prime[j] == 0) {
                is_prime[j] = 1;
            }
        }
    }
    int ans = 0;
    fe(i, 2, nn) {
        if(is_prime[i] == 0) {
            ans = i;
        }
    }
    if(ans == 0) {
        cout << "1" << N; return;
    }
    cout << ans << N;

}

int main() {

    int t; cin >> t; while(t--)
    solve();
}


/*********************************************************************|
|---------|    /\  ....                  ....                         |
     |        /  \   \                    /  /------| ----- |-------| |
     |       /    \   \                  /  /           |   |         |
     |      /      \   \       /\       /  |            |   |         |
     |     /        \   \     /  \     /   |---|        |   |----|    |
     |    /__________\   \   /    \   /        |---|    |   |         |
     |   /            \   \ /      \ /              |   |   |         |
     |  /              \   |        |               /   |   |         |
     _ __              __ ...      ...      |------/  ----- _         |
                                                                      |
        Md Tawsif Rahman                                              |
        Institute Of Information Technology                           |
        Jahangirnagar University                                      |
                                                                      |
**********************************************************************/
#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define pii pair <int, int >
#define pll pair < ll, ll >
#define xx first
#define yy second
#define vi vector < int >
#define vl vector < ll >
#define vp vector < pii >
#define inf  100000000
#define f(i, c, n) for(int i = c; i < n; i++)
#define fe(i, c, n) for(int i = c; i <= n; i++)
#define fr(i, n, c) for(int i = n - 1; i >= c; i--)
#define vbe(a) a.begin(), a.end()
#define vsort(a) sort(a.begin(), a.end())
#define mem(a) memset(a, 0, sizeof(a))
#define memn(a) memset(a, -1, sizeof(a))
#define srti(a, n) sort(a, a + n)
#define srtd(a, n) sort(a, a + n, greater<int>())
#define LB(a, x) (lower_bound(vbe(a), x) - a.begin())
#define UB(a, x) (upper_bound(vbe(a), x) - a.begin())

#define S " "
#define N "\n"

#define fast ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

// int convert_str_to_int(string s) {
//     stringstream str(s);
//     int x = 0;
//     str >> x;
//     return x;
// }
// void bin(int num) {
//  if(num == 0) return;
//  if(num % 2 == 0) {
//      x.pb(0);
//      num /= 2;
//  } else {
//      num /= 2;
//      x.pb(1);
//  }
//  bin(num);
// }

/********************|
                     |
   START HERE        |
                     |
*********************/
int is_prime[1000002];

void solve() {

    int n; cin >> n;
    int ans = 1;
    fe(i, 2, n) {
        if(i * 2 <= n) ans = i;
    }

    cout << ans << N;
}

int main() {

    int t; cin >> t; while(t--)
    solve();
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long long ll;
#define pb push_back
#define po pop_back
#define pii pair < lli ,lli >
#define it iterator
#define pll pair < ll, ll>
#define plli pair < lli, lli>
#define mp make_pair
#define vi vector <lli>
#define len length
#define fi first
#define sec second
#define sz size
#define rep(i,a,b) for(lli i=a;i<=b;i++)
#define repi(i,a,b) for(lli i=a;i>=b;i--)
#define Pi 3.1415926535897932384626433832795
#define all(c) c.begin(),c.end()
#define alli(c) c.rbegin(),c.rend()
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	 #ifndef ONLINE_JUDGE
	  freopen("input.txt", "r", stdin);
	  freopen("output.txt", "w", stdout);
	#endif
	lli t,n,k,p,j,m;
	cin>>t;
	while(t--)
	{
		cin>>n;
		cout<<n/2<<"\n";
}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long long ll;
#define pb push_back
#define po pop_back
#define pii pair < lli ,lli >
#define it iterator
#define pll pair < ll, ll>
#define plli pair < lli, lli>
#define mp make_pair
#define vi vector <lli>
#define len length
#define fi first
#define sec second
#define sz size
#define rep(i,a,b) for(lli i=a;i<b;i++)
#define repi(i,a,b) for(lli i=a;i>=b;i--)
#define Pi 3.1415926535897932384626433832795
#define all(c) c.begin(),c.end()
#define alli(c) c.rbegin(),c.rend()
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	 #ifndef ONLINE_JUDGE
	  freopen("input.txt", "r", stdin);
	  freopen("output.txt", "w", stdout);
	#endif
	lli t,n,k,p;
	cin>>t;
	while(t--)
	{
		cin>>n;
		k=1;
		rep(i,1,n)
		{
			rep(j,i+1,n+1)
			{
				p=__gcd(i,j);
				k=max(p,k);
			}
		}
		cout<<k<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long long ll;
#define pb push_back
#define po pop_back
#define pii pair < lli ,lli >
#define it iterator
#define pll pair < ll, ll>
#define plli pair < lli, lli>
#define mp make_pair
#define vi vector <lli>
#define len length
#define fi first
#define sec second
#define sz size
#define rep(i,a,b) for(lli i=a;i<b;i++)
#define repi(i,a,b) for(lli i=a;i>=b;i--)
#define Pi 3.1415926535897932384626433832795
#define all(c) c.begin(),c.end()
#define alli(c) c.rbegin(),c.rend()
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	 #ifndef ONLINE_JUDGE
	  freopen("input.txt", "r", stdin);
	  freopen("output.txt", "w", stdout);
	#endif
	lli t,n,k,p,j;
	cin>>t;
	while(t--)
	{
		cin>>n;
		k=1;
		rep(i,1,n)
		{
			for(j=i*2;j<=n;j=j*2)
			{
				p=__gcd(i,j);
				k=max(p,k);
			}
		}
		cout<<k<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long long ll;
#define pb push_back
#define po pop_back
#define pii pair < lli ,lli >
#define it iterator
#define pll pair < ll, ll>
#define plli pair < lli, lli>
#define mp make_pair
#define vi vector <lli>
#define len length
#define fi first
#define sec second
#define sz size
#define rep(i,a,b) for(lli i=a;i<=b;i++)
#define repi(i,a,b) for(lli i=a;i>=b;i--)
#define Pi 3.1415926535897932384626433832795
#define all(c) c.begin(),c.end()
#define alli(c) c.rbegin(),c.rend()
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	 #ifndef ONLINE_JUDGE
	  freopen("input.txt", "r", stdin);
	  freopen("output.txt", "w", stdout);
	#endif
	lli t,n,k,p,j,m;
	cin>>t;
	while(t--)
	{
		cin>>n;
		k=1;
		if(n%2==0)
			m=n/2;
		else
			m=n/2+1;
		rep(i,1,m)
		{
			for(j=i*2;j<=n;j=j*2)
			{
				p=__gcd(i,j);
				k=max(p,k);
			}
		}
		cout<<k<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long long ll;
#define pb push_back
#define po pop_back
#define pii pair < lli ,lli >
#define it iterator
#define pll pair < ll, ll>
#define plli pair < lli, lli>
#define mp make_pair
#define vi vector <lli>
#define len length
#define fi first
#define sec second
#define sz size
#define rep(i,a,b) for(lli i=a;i<b;i++)
#define repi(i,a,b) for(lli i=a;i>=b;i--)
#define Pi 3.1415926535897932384626433832795
#define all(c) c.begin(),c.end()
#define alli(c) c.rbegin(),c.rend()
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	 #ifndef ONLINE_JUDGE
	  freopen("input.txt", "r", stdin);
	  freopen("output.txt", "w", stdout);
	#endif
	lli t,n,k,p,j;
	cin>>t;
	while(t--)
	{
		cin>>n;
		k=1;
		rep(i,1,n)
		{
			for(j=i*2;j<=n;j++)
			{
				p=__gcd(i,j);
				k=max(p,k);
			}
		}
		cout<<k<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long long ll;
#define pb push_back
#define po pop_back
#define pii pair < lli ,lli >
#define it iterator
#define pll pair < ll, ll>
#define plli pair < lli, lli>
#define mp make_pair
#define vi vector <lli>
#define len length
#define fi first
#define sec second
#define sz size
#define rep(i,a,b) for(lli i=a;i<=b;i++)
#define repi(i,a,b) for(lli i=a;i>=b;i--)
#define Pi 3.1415926535897932384626433832795
#define all(c) c.begin(),c.end()
#define alli(c) c.rbegin(),c.rend()
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	 #ifndef ONLINE_JUDGE
	  freopen("input.txt", "r", stdin);
	  freopen("output.txt", "w", stdout);
	#endif
	lli t,n,k,p,j,m;
	cin>>t;
	while(t--)
	{
		cin>>n;
		if(n%2==0)
	cout<<n/2<<"\n";
else
	cout<<n/2-1<<"\n";
}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b) - 1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define rb(i,x) for (auto& i : x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define F first
#define S second

const int MOD = 1e9 + 7;
const int INF = 1e9;

void setIO(string s) {
	ios_base::sync_with_stdio(0); cin.tie(0);
	freopen((s+".in").c_str(),"r",stdin);
	//freopen((s+".out").c_str(),"w",stdout);
}

int gcd[1000000];

int main() {

    setIO("input");
    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        F0R(i,n) {
            FOR(j,1,ceil(sqrt(i))+1)
                if(i % j == 0)
                    gcd[j]++;
        }
        int ans = 0;
        FOR(i,1,1000001) {
            if (gcd[i] > 1)
                ans = i;
        }
        cout << ans << '\n';
    }

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b) - 1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define rb(i,x) for (auto& i : x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define F first
#define S second

const int MOD = 1e9 + 7;
const int INF = 1e9;

void setIO(string s) {
	ios_base::sync_with_stdio(0); cin.tie(0);
//	freopen((s+".in").c_str(),"r",stdin);
	//freopen((s+".out").c_str(),"w",stdout);
}

int divi[1000000];

int main() {

    setIO("input");
    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        F0R(i,n) {
            FOR(j,1,ceil(sqrt(i))+1)
                if(i % j == 0)
                    divi[j]++;
        }
        int ans = 0;
        FOR(i,1,1000001) {
            if (divi[i] > 1)
                ans = i;
        }
        cout << ans << '\n';
    }

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b) - 1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define rb(i,x) for (auto& i : x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define F first
#define S second

const int MOD = 1e9 + 7;
const int INF = 1e9;

void setIO(string s) {
	ios_base::sync_with_stdio(0); cin.tie(0);
//	freopen((s+".in").c_str(),"r",stdin);
//	freopen((s+".out").c_str(),"w",stdout);
}

int main()
{

    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        cout << n / 2 << '\n';
    }

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b) - 1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define rb(i,x) for (auto& i : x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define F first
#define S second

const int MOD = 1e9 + 7;
const int INF = 1e9;

void setIO(string s) {
	ios_base::sync_with_stdio(0); cin.tie(0);
	freopen((s+".in").c_str(),"r",stdin);
//	freopen((s+".out").c_str(),"w",stdout);
}

int divi[1000000];

int main() {

    setIO("input");
    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        F0R(i,n) {
            FOR(j,1,floor(sqrt(i))+1)
                if(i % j == 0) {
                    divi[j]++;
                    divi[i/j]++;
                }

        }
        int ans = 1;
        FOR(i,1,1000001) {
            if (divi[i] > 1)
                ans = i;
        }
        cout << ans << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b) - 1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define rb(i,x) for (auto& i : x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define F first
#define S second

const int MOD = 1e9 + 7;
const int INF = 1e9;

void setIO(string s) {
	ios_base::sync_with_stdio(0); cin.tie(0);
//	freopen((s+".in").c_str(),"r",stdin);
	//freopen((s+".out").c_str(),"w",stdout);
}

int gcd[1000000];

int main() {

    setIO("input");
    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        F0R(i,n) {
            FOR(j,1,ceil(sqrt(i))+1)
                if(i % j == 0)
                    gcd[j]++;
        }
        int ans = 0;
        FOR(i,1,1000001) {
            if (gcd[i] > 1)
                ans = i;
        }
        cout << ans << '\n';
    }

}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b) - 1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define rb(i,x) for (auto& i : x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define F first
#define S second

const int MOD = 1e9 + 7;
const int INF = 1e9;

void setIO(string s) {
	ios_base::sync_with_stdio(0); cin.tie(0);
//	freopen((s+".in").c_str(),"r",stdin);
//	freopen((s+".out").c_str(),"w",stdout);
}

int divi[1000000];

int main() {

    setIO("input");
    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        F0R(i,n) {
            FOR(j,1,floor(sqrt(i))+1)
                if(i % j == 0) {
                    divi[j]++;
                    divi[i/j]++;
                }

        }
        int ans = 1;
        FOR(i,1,1000001) {
            if (divi[i] > 1)
                ans = i;
        }
        cout << ans << '\n';
    }
}


#include <bits/stdc++.h>
//for(i=0;i<n;i++) cin>>a[i];
using namespace std;
int main(void){
    // Your code here!
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int i,j,gcm=0;
        int d[n];
        for(i=1;i<=n;i++)
         d[i]={0};
        for(i=1;i<=n;i++)
        {
            for(j=1;j<=sqrt(i);j++)
            {
                if(i%j==0)
                d[j]++;
                if(j*j!=i)
                d[i/j]++;
            }
        }
        for(i=n;i>=1;i--)
        {if(d[i]>1)
        {gcm=i;break;}
        }
        cout<<gcm<<endl;
    }
}


#include <bits/stdc++.h>
//for(i=0;i<n;i++) cin>>a[i];
using namespace std;
int main(void){
    // Your code here!
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int i,j,gcm=0;
        for(i=1;i<=n;i++)
        {
            for(j=i+1;j<=n;j++)
            {
                gcm=max(gcm,gcd(i,j));

            }
        }
        cout<<gcm<<endl;
    }
}


#include <bits/stdc++.h>
//for(i=0;i<n;i++) cin>>a[i];
using namespace std;
int main(void){
    // Your code here!
    int t;
    cin>>t;
    while(t--)
    {
        long long int n;
        cin>>n;
        long long int i,j,gcm=0;
        for(i=1;i<=n;i++)
        {
            for(j=i+1;j<=n;j++)
            {
                gcm=max(gcm,gcd(i,j));

            }
        }
        cout<<gcm<<endl;
    }
}


#include <bits/stdc++.h>
//for(i=0;i<n;i++) cin>>a[i];
using namespace std;
int main(void){
    // Your code here!
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        cout<<sqrt(n)<<endl;
    }
}


#include <bits/stdc++.h>
//for(i=0;i<n;i++) cin>>a[i];
using namespace std;
int main(void){
    // Your code here!
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        cout<<(n/2)<<endl;
    }
}


#include <bits/stdc++.h>
//for(i=0;i<n;i++) cin>>a[i];
using namespace std;
int main(void){
    // Your code here!
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        cout<<(int)sqrt(n)<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
 long long MX(long long a){
 	long long c = a;
 	long long d = -1;
 	long long mxx = -10e6;
	for ( int i = 2; i * i <= a; ++i ){
		if (a % i == 0){
			d = 1;
			break;
		}
	}
	if (d == -1)--c;
	for ( long long j = c - 1; j >= 1; --j ){
		mxx = max(mxx, __gcd(c, j));
	}
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	if (l != 1)
    	cout << MX(l) << "\n";
    	else cout << "1\n";
	}
 }


#include <bits/stdc++.h>
using namespace std;
 long long MX( long long a){
 	int c = a;
	for ( int i = 2; i * i <= a; ++i ){
		if (a % i == 0){
			a = 1;
			break;
		}
	}
	if (a != 1)--c;
	for ( int j = c - 1; j >= 1; --j ){
		if (c % j == 0){
			return j;
			break;
		}
	}
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	if (l != 2)
    	cout << MX(l) << "\n";
    	else cout << "1\n";
	}
 }


#include <bits/stdc++.h>
using namespace std;
 long long MX( long long a){
 	int c = a;
	for ( int i = 2; i * i <= a; ++i ){
		if (a % i == 0){
			a = 1;
			break;
		}
	}
	if (a != 1)--c;
	for ( int j = c - 1; j >= 1; --j ){
		if (c % j == 0){
			return j;
			break;
		}
	}
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	if (l != 2)
    	cout << MX(l) << "\n";
    	else cout << "1\n";
	}


#include <bits/stdc++.h>
using namespace std;
 long long MX( long long a){
 	long long maxx = -10e6;
 	for ( long long i = 1; i <= a; ++i ){
 	   for ( long long j = i + 1; j <= a; ++j ){
 	   	    maxx = max(maxx, __gcd(i, j));
	   }
    }
    return maxx;
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	cout << MX(l) << "\n";
	}
 }


#include <bits/stdc++.h>
using namespace std;
 long long MX(long long a){
 	long long c = a;
 	long long d = -1;
	for ( int i = 2; i * i <= a; ++i ){
		if (a % i == 0){
			d = 1;
			break;
		}
	}
	if (d == -1)--c;
	for ( int j = c - 1; j >= 1; --j ){
		if (c % j == 0){
			return j;
			break;
		}
	}
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	if (l != 2)
    	cout << MX(l) << "\n";
    	else cout << "1\n";
	}
 }


#include <bits/stdc++.h>
using namespace std;

 long long MX( long long a){
 	long long maxx = -10e6;
 	for ( long long i = a; i >= a / 2; --i ){
 	   for ( long long j = a - 1; j >= a / 2; --j ){
 	   	    if (i != j)
 	   	    maxx = max(maxx, __gcd(i, j));
	   }
    }
    return maxx;
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	cout << MX(l) << "\n";
	}
 }


#include <bits/stdc++.h>
using namespace std;
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	cout << l/2 << "\n";
	}
 }


#include <bits/stdc++.h>
using namespace std;
 long long MX( long long a){
 	int c = a;
	for ( int i = 2; i * i <= a; ++i ){
		if (a % i == 0){
			a = 1;
			break;
		}
	}
	if (a != 1)--c;
	for ( int j = c - 1; j >= 1; --j ){
		if (c % j == 0){
			return j;
			break;
		}
	}
 }
 int main()
 {
    long long t;
    cin >> t;
    while(t--){
    	long long l;
    	cin >> l;
    	cout << MX(l) << "\n";
	}
 }


#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
int n;
long long i,mx,t,x,j;
long long  gcd(long long a,long long b){
    if(b==0){
        return a;
    }
    return gcd(b,a%b);
}
int main()
{

    cin>>n;
    while(n--){
        cin>>t;
        for(i=1;i<t;i++){
            for(j=i+1;j<=t;j++){
                x=gcd(j,i);
                mx=max(mx,x);

            }
        }
        cout<<mx<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'

const ll mod = 1e9+7;

ll inf = 1e18 + 40ll;

ll sum(ll k, ll n){
	return k*n + ((n-2ll)*(n-1ll))/2ll;
}
int main(){
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	//cout.tie(0);

	ll n; cin>>n;
	vector<ll> h(n,0);
	ll sum_h = 0;
	for(int i =0; i <n; ++i){
		cin>>h[i];
		sum_h+= h[i];
	}
	ll max_k = inf;
	ll min_k = h[0];
	while(max_k > min_k){
		ll mid_k = (max_k + min_k +1)/2ll;
		ll mid_sum = sum(mid_k, n);
		if(mid_sum > sum_h)
			max_k = mid_k - 1;
		else
			min_k = mid_k;
	}
	ll t = sum_h - sum(max_k,n);
	for(int i = 0; i < n-1; ++i){
		cout<< i + max_k<<" ";
		if(i == t)
			cout<< i + max_k<<" ";
	}
	if(t == n-1ll){
		cout<<t+max_k<<" ";
	}
	cout<<endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'

const ll mod = 1e9+7;

ll inf = 2ll*1e18;

ll sum(ll k, ll n){
	return k*n + ((n-2ll)*(n-1ll))/2ll;
}
int main(){
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	//cout.tie(0);

	ll n; cin>>n;
	vector<ll> h(n,0);
	ll sum_h = 0;
	for(int i =0; i <n; ++i){
		cin>>h[i];
		sum_h+= h[i];
	}
	ll max_k = inf;
	ll min_k = h[0];
	while(max_k > min_k){
		ll mid_k = (max_k + min_k +1)/2ll;
		ll mid_sum = sum(mid_k, n);
		if(mid_sum > sum_h)
			max_k = mid_k - 1;
		else
			min_k = mid_k;
	}
	ll t = sum_h - sum(max_k,n);
	for(int i = 0; i < n-1; ++i){
		cout<< i + max_k<<" ";
		if(i == t)
			cout<< i + max_k<<" ";
	}
	if(t == n-1ll){
		cout<<t+max_k<<" ";
	}
	cout<<endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'

const ll mod = 1e9+7;

ll inf = 2ll*1e14;

ll sum(ll k, ll n){
	return k*n + ((n-2ll)*(n-1ll))/2ll;
}
int main(){
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	//cout.tie(0);

	ll n; cin>>n;
	vector<ll> h(n,0);
	ll sum_h = 0;
	for(int i =0; i <n; ++i){
		cin>>h[i];
		sum_h+= h[i];
	}
	ll max_k = inf;
	ll min_k = h[0];
	while(max_k > min_k){
		ll mid_k = (max_k + min_k +1)/2ll;
		ll mid_sum = sum(mid_k, n);
		if(mid_sum > sum_h)
			max_k = mid_k - 1;
		else
			min_k = mid_k;
	}
	ll t = sum_h - sum(max_k,n);
	for(int i = 0; i < n-1; ++i){
		cout<< i + max_k<<" ";
		if(i == t)
			cout<< i + max_k<<" ";
	}
	if(t == n-1ll){
		cout<<t+max_k<<" ";
	}
	cout<<endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'

const ll mod = 1e9+7;

ll inf = 2ll*1e13;

ll sum(ll k, ll n){
	return k*n + ((n-2ll)*(n-1ll))/2ll;
}
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	ll n; cin>>n;
	vector<ll> h(n,0);
	ll sum_h = 0;
	for(int i =0; i <n; ++i){
		cin>>h[i];
		sum_h+= h[i];
	}
	ll max_k = inf;
	ll min_k = h[0];
	while(max_k > min_k){
		ll mid_k = (max_k + min_k +1)/2ll;
		ll mid_sum = sum(mid_k, n);
		if(mid_sum > sum_h)
			max_k = mid_k - 1;
		else
			min_k = mid_k;
	}
	ll t = sum_h - sum(max_k,n);
	for(int i = 0; i < n-1; ++i){
		cout<< i + max_k<<" ";
		if(i == t)
			cout<< i + max_k<<" ";
	}
	if(t == n-1ll){
		cout<<t+max_k<<" ";
	}
	cout<<endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'

const ll mod = 1e9+7;

ll inf = 1e12;

ll sum(ll k, ll n){
	return k*n + ((n-2ll)*(n-1ll))/2ll;
}
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	ll n; cin>>n;
	vector<ll> h(n,0);
	ll sum_h = 0;
	for(int i =0; i <n; ++i){
		cin>>h[i];
		sum_h+= h[i];
	}
	ll max_k = inf;
	ll min_k = h[0];
	while(max_k > min_k){
		ll mid_k = (max_k + min_k +1)/2ll;
		ll mid_sum = sum(mid_k, n);
		if(mid_sum > sum_h)
			max_k = mid_k - 1;
		else
			min_k = mid_k;
	}
	ll t = sum_h - sum(max_k,n);
	for(int i = 0; i < n-1; ++i){
		cout<< i + max_k<<" ";
		if(i == t)
			cout<< i + max_k<<" ";
	}
	if(t == n-1ll){
		cout<<t+max_k<<" ";
	}
	cout<<endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'

const ll mod = 1e9+7;

ll inf = 1e14;

ll sum(ll k, ll n){
	return k*n + ((n-2ll)*(n-1ll))/2ll;
}
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	ll n; cin>>n;
	vector<ll> h(n,0);
	ll sum_h = 0;
	for(int i =0; i <n; ++i){
		cin>>h[i];
		sum_h+= h[i];
	}
	ll max_k = inf;
	ll min_k = h[0];
	while(max_k > min_k){
		ll mid_k = (max_k + min_k +1)/2ll;
		ll mid_sum = sum(mid_k, n);
		if(mid_sum > sum_h)
			max_k = mid_k - 1;
		else
			min_k = mid_k;
	}
	ll t = sum_h - sum(max_k,n);
	for(int i = 0; i < n-1; ++i){
		cout<< i + max_k<<" ";
		if(i == t)
			cout<< i + max_k<<" ";
	}
	if(t == n-1ll){
		cout<<t+max_k<<" ";
	}
	cout<<endl;

	return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
#define M 1000000007
#define L 1000000000
#define mp make_pair
#define eps 1e-12
#define int long long
#define float long double
#pragma GCC optimize("Ofast")
#pragma unroll
#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#define _CRT_SECURE_NO_WARNINGS

int a[2000010],b[2000110],c[2000010],z=0,d[2000110],w[2000110],mat[1001][1001],x,m,n;
set<int> depth;
long double an[100010],S,D,S1,S2,X,Y,tim,te=0,tt=0,tt1=0;
string st1[1000101],st,st2,st3;char str[1000001],ch,ch2,ch3,*si;
 int modulo(int a,int b=M-2,int n=M){
    int x=1,y=a;
    while(b > 0){
        if(b%2 == 1){
            x=(x*y)%n;
        }
        y = (y*y)%n; // squaring the base
        b /= 2;
    }
    return x%n;
}
set<pair<int,int> > bad;
vector<int> g[300001];
vector<int> h[100001];
pair<int,int> zero=mp(0,-1);
template<class T >
ostream& operator<<(ostream& o,vector<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<class T ,class T1>
ostream& operator<<(ostream& o,map<T,T1> v)
{
for(auto x : v)o<<x.first<<' '<<x.second<<endl;
o<<endl;
return o;
}
template<class T >
ostream& operator<<(ostream& o,set<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<typename T,typename T2>
auto find(T& v,T2 x)
{
return find(v.begin(),v.end(),x);
}
template<typename T,typename T2>
auto lower_bound(T& v,T2 x)
{
return lower_bound(v.begin(),v.end(),x);
}
template<typename T,typename T2>
auto upper_bound(T& v,T2 x)
{
return upper_bound(v.begin(),v.end(),x);
}
template<typename T,typename T2>
void sort(vector<T>& v,T2 x)
{
sort(v.begin(),v.end(),x);
}
template<typename T>
void sort(vector<T>& v)
{
sort(v.begin(),v.end());
}
template<class T >
ostream& operator<<(ostream& o,multiset<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<class T,class T2 >
ostream& operator<<(ostream& o,pair<T,T2> v)
{
o<<v.first<<' '<<v.second<<endl;
return o;
}
template<class T1,class T2>
T2 min(T1 a,T2 b)
{
return min((T2)a,b);
}
template<class T1,class T2>
T2 max(T1 a,T2 b)
{
return max((T2)a,b);
}

int vis[100001]={0};

class UF    {
public:
    int *id, cnt, *sz;

	// Create an empty union find data structure with N isolated sets.
    UF(int N)   {
        cnt = N;
	id = new int[N];
	sz = new int[N];
        for(int i=0; i<N; i++)	{
            id[i] = i;
	    sz[i] = 1;
	}
    }
    ~UF()	{
	delete [] id;
	delete [] sz;
    }
	// Return the id of component corresponding to object p.
    int find(int p)	{
        int root = p;
        while (root != id[root])
            root = id[root];
        while (p != root) {
            int newp = id[p];
            id[p] = root;
            p = newp;
        }
        return root;
    }
	// Replace sets containing x and y with their union.
    void merge(int x, int y)	{
        int i = find(x);
        int j = find(y);
        if (i == j) return;

		// make smaller root point to larger one
        if   (sz[i] < sz[j])	{
		id[i] = j;
		sz[j] += sz[i];
	} else	{
		id[j] = i;
		sz[i] += sz[j];
	}
        cnt--;
    }
	// Are objects x and y in the same set?
    bool connected(int x, int y)    {
        return find(x) == find(y);
    }
	// Return the number of disjoint sets.
    int count() {
        return cnt;
    }

};

void treefy(int i)
{
for(int x:g[i])
g[x].erase(find(g[x].begin(),g[x].end(),i));
for(int x:g[i])
treefy(x);
}

void factorial(int *b,int* c,int x=100000)
{
b[0]=1;int i;
for(i=1;i<=x+5;i++)
b[i]=b[i-1]*i%M;
c[x+2]=modulo(b[x+2]);
for(i=x+1;i>-1;i--)
c[i]=c[i+1]*(i+1)%M;
}
int comb(int n,int r,int* b,int* c)
{
if(r>n)return 0;
return b[n]*c[n-r]%M*c[r]%M;
}

long double flor(long double x)
{
if(abs(x-round(x))<eps)
return round(x);
else return floor(x);
}
int ceil(int x,int y)
{
return x/y+(x%y!=0);
}
int rond(float x)
{
int y=round(x);
if(x-y>0&&x-y-0.5>-eps)
return y+1;
else return y;
}
bool prime(int n)
{
if(n==1)return 0;
for(int i=2;i*i<=n;i++)
if(n%i==0)return 0;
return 1;
}
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

int32_t main()
{
    std::ios::sync_with_stdio(false);
cin.tie(NULL);
 int t,j,r,q,u,s1,s2,s3,bb,l,c1,v1,v2,z,c2,n1,nn,x1,hx,hy,tx,ty,n2, js,maxi,i,s,n3,R,mx,p,v,o,m1,t1,k1,k,k2,k3,N,T,y,x3,y3,sq,x2,y1,y2,p1,
q1,l1,r1,t2,l2,r2,ans1,z1;
T=1;
//cin>>T;
//factorial(b,c,3e5);
srand(time(NULL));
tim=clock();float ti=0;
N=T;
while(T--)
{
//cout<<"Case #"<<N-T<<": ";
cin>>n;
s=0;
for(i=0;i<n;i++)
cin>>a[i],s+=a[i];
//cout<<1<<endl;
m=ceil((2*s/(0.0L+n)-n+1)/2+eps);
set<int> left;
for(i=n-1;i>0;i--)
if(a[i]>=m+i)
a[i-1]+=a[i]-(m+i),a[i]=m+i;
else left.insert(i);
for(i=0;i<n;i++)
cout<<a[i]<<' ';
cout<<endl;
left.insert(0);
for(i=1;i<n;i++)
{
while(a[i]-a[i-1]>1)
{
auto it=left.lower_bound(i);
it--;j=*it;
a[j]++,a[i]--;
if(j>0)
left.erase(j);
if(j<i-1)
left.insert(j+1);
}
if(a[i]==a[i-1])left.insert(i);
}
for(i=0;i<n;i++)
cout<<a[i]<<' ';
cout<<endl;

f:;
}
cerr<<(clock()-tim)/CLOCKS_PER_SEC<<endl;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
#define M 1000000007
#define L 1000000000
#define mp make_pair
#define eps 1e-12
#define int long long
#define float long double
#pragma GCC optimize("Ofast")
#pragma unroll
#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#define _CRT_SECURE_NO_WARNINGS

int a[2000010],b[2000110],c[2000010],z=0,d[2000110],w[2000110],mat[1001][1001],x,m,n;
set<int> depth;
long double an[100010],S,D,S1,S2,X,Y,tim,te=0,tt=0,tt1=0;
string st1[1000101],st,st2,st3;char str[1000001],ch,ch2,ch3,*si;
 int modulo(int a,int b=M-2,int n=M){
    int x=1,y=a;
    while(b > 0){
        if(b%2 == 1){
            x=(x*y)%n;
        }
        y = (y*y)%n; // squaring the base
        b /= 2;
    }
    return x%n;
}
set<pair<int,int> > bad;
vector<int> g[300001];
vector<int> h[100001];
pair<int,int> zero=mp(0,-1);
template<class T >
ostream& operator<<(ostream& o,vector<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<class T ,class T1>
ostream& operator<<(ostream& o,map<T,T1> v)
{
for(auto x : v)o<<x.first<<' '<<x.second<<endl;
o<<endl;
return o;
}
template<class T >
ostream& operator<<(ostream& o,set<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<typename T,typename T2>
auto find(T& v,T2 x)
{
return find(v.begin(),v.end(),x);
}
template<typename T,typename T2>
auto lower_bound(T& v,T2 x)
{
return lower_bound(v.begin(),v.end(),x);
}
template<typename T,typename T2>
auto upper_bound(T& v,T2 x)
{
return upper_bound(v.begin(),v.end(),x);
}
template<typename T,typename T2>
void sort(vector<T>& v,T2 x)
{
sort(v.begin(),v.end(),x);
}
template<typename T>
void sort(vector<T>& v)
{
sort(v.begin(),v.end());
}
template<class T >
ostream& operator<<(ostream& o,multiset<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<class T,class T2 >
ostream& operator<<(ostream& o,pair<T,T2> v)
{
o<<v.first<<' '<<v.second<<endl;
return o;
}
template<class T1,class T2>
T2 min(T1 a,T2 b)
{
return min((T2)a,b);
}
template<class T1,class T2>
T2 max(T1 a,T2 b)
{
return max((T2)a,b);
}

int vis[100001]={0};

class UF    {
public:
    int *id, cnt, *sz;

	// Create an empty union find data structure with N isolated sets.
    UF(int N)   {
        cnt = N;
	id = new int[N];
	sz = new int[N];
        for(int i=0; i<N; i++)	{
            id[i] = i;
	    sz[i] = 1;
	}
    }
    ~UF()	{
	delete [] id;
	delete [] sz;
    }
	// Return the id of component corresponding to object p.
    int find(int p)	{
        int root = p;
        while (root != id[root])
            root = id[root];
        while (p != root) {
            int newp = id[p];
            id[p] = root;
            p = newp;
        }
        return root;
    }
	// Replace sets containing x and y with their union.
    void merge(int x, int y)	{
        int i = find(x);
        int j = find(y);
        if (i == j) return;

		// make smaller root point to larger one
        if   (sz[i] < sz[j])	{
		id[i] = j;
		sz[j] += sz[i];
	} else	{
		id[j] = i;
		sz[i] += sz[j];
	}
        cnt--;
    }
	// Are objects x and y in the same set?
    bool connected(int x, int y)    {
        return find(x) == find(y);
    }
	// Return the number of disjoint sets.
    int count() {
        return cnt;
    }

};

void treefy(int i)
{
for(int x:g[i])
g[x].erase(find(g[x].begin(),g[x].end(),i));
for(int x:g[i])
treefy(x);
}

void factorial(int *b,int* c,int x=100000)
{
b[0]=1;int i;
for(i=1;i<=x+5;i++)
b[i]=b[i-1]*i%M;
c[x+2]=modulo(b[x+2]);
for(i=x+1;i>-1;i--)
c[i]=c[i+1]*(i+1)%M;
}
int comb(int n,int r,int* b,int* c)
{
if(r>n)return 0;
return b[n]*c[n-r]%M*c[r]%M;
}

long double flor(long double x)
{
if(abs(x-round(x))<eps)
return round(x);
else return floor(x);
}
int ceil(int x,int y)
{
return x/y+(x%y!=0);
}
int rond(float x)
{
int y=round(x);
if(x-y>0&&x-y-0.5>-eps)
return y+1;
else return y;
}
bool prime(int n)
{
if(n==1)return 0;
for(int i=2;i*i<=n;i++)
if(n%i==0)return 0;
return 1;
}
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

int32_t main()
{
    std::ios::sync_with_stdio(false);
cin.tie(NULL);
 int t,j,r,q,u,s1,s2,s3,bb,l,c1,v1,v2,z,c2,n1,nn,x1,hx,hy,tx,ty,n2, js,maxi,i,s,n3,R,mx,p,v,o,m1,t1,k1,k,k2,k3,N,T,y,x3,y3,sq,x2,y1,y2,p1,
q1,l1,r1,t2,l2,r2,ans1,z1;
T=1;
//cin>>T;
//factorial(b,c,3e5);
srand(time(NULL));
tim=clock();float ti=0;
N=T;
while(T--)
{
//cout<<"Case #"<<N-T<<": ";
cin>>n;
s=0;
for(i=0;i<n;i++)
cin>>a[i],s+=a[i];
//cout<<1<<endl;
m=ceil((2*s/(0.0L+n)-n+1)/2+eps);
s1=n*(2*m+n-1)/2;
k=n-(s1-s);
for(i=0;i<k;i++)
a[i]=m+i;
for(i=k;i<n;i++)
a[i]=m+i-1;
for(i=0;i<n;i++)
cout<<a[i]<<' ';
cout<<endl;

f:;
}
cerr<<(clock()-tim)/CLOCKS_PER_SEC<<endl;
}