/* Author: Avinash Krishna */
#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 llmax LONG_LONG_MAX
#define llmin LONG_LONG_MIN
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define yes cout<<"YES"<<"\n"
#define no cout<<"NO"<<"\n"
#define endl '\n'
#define arrina ll a[n];for(int i=0;i<n;i++){cin>>a[i];}
#define arrinb ll b[n];for(int i=0;i<n;i++){cin>>b[i];}
const ll mod=1000000007;
ll binpow(ll a, ll b) {if (b == 0)return 1;ll res = binpow(a, b / 2);if (b % 2) return res * res * a; else return res * res;}
ll binpowmod(ll a, ll b, ll m) {a %= m;ll res = 1; while (b > 0) {if (b & 1)res = res * a % m;a = a * a % m;b >>= 1;}return res;}
ll gcd(ll a,ll b){if(b>a){return gcd(b,a);}if(b==0){return a;}return gcd(b,a%b);}
ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}
ll c1s(string s){ll c=0;for(int i=0;i<s.size();i++){if(s[i]=='1')c++;}return c;}
ll c0s(string s){ll c=0;for(int i=0;i<s.size();i++){if(s[i]=='0')c++;}return c;}
bool isPrime(int n){if (n <= 1)return false;for (int i = 2; i * i <= n; i++) {if (n % i == 0) return false;}return true;}
bool isSquare(long double x){if (x >= 0) {long long sr = sqrt(x); return (sr * sr == x);} return false;}
bool isPalindrome(string &s, int low, int high) {while (low < high) {if (s[low++] != s[high--]) return false;}return true;}
ll binarySearch(ll arr[], ll l, ll r, ll x){while (l <= r) {ll m = l + (r - l) / 2;if (arr[m] == x)return m;if (arr[m] < x)l = m + 1;else r = m - 1;}return -1;}
int main(void){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t;
// t=1;
cin>>t;
while(t--){
ll n;
cin>>n;
ll p = (ll)log2(n);
cout<<binpow(2, p)<<endl;
end:;
}
}
1672C - Unequal Array | 1706C - Qpwoeirut And The City |
1697A - Parkway Walk | 1505B - DMCA |
478B - Random Teams | 1705C - Mark and His Unfinished Essay |
1401C - Mere Array | 1613B - Absent Remainder |
1536B - Prinzessin der Verurteilung | 1699B - Almost Ternary Matrix |
1545A - AquaMoon and Strange Sort | 538B - Quasi Binary |
424A - Squats | 1703A - YES or YES |
494A - Treasure | 48B - Land Lot |
835A - Key races | 1622C - Set or Decrease |
1682A - Palindromic Indices | 903C - Boxes Packing |
887A - Div 64 | 755B - PolandBall and Game |
808B - Average Sleep Time | 1515E - Phoenix and Computers |
1552B - Running for Gold | 994A - Fingerprints |
1221C - Perfect Team | 1709C - Recover an RBS |
378A - Playing with Dice | 248B - Chilly Willy |