#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define pb push_back #define mp make_pair #define fillchar(a, x) memset(a, x, sizeof(a)) #define copy(a, b) memcpy(a, b, sizeof(a)) #define lson rt << 1, l, mid #define rson rt << 1|1, mid + 1, r typedef long long LL; typedef pair PII; typedef unsigned long long uLL; template void print(T* p, T* q, string Gap = " ") { int d = p < q ? 1 : -1; while(p != q) { cout << *p; p += d; if(p != q) cout << Gap; } cout << endl; } template void print(const T &a, string bes = "") { int len = bes.length(); if(len >= 2)cout << bes[0] << a << bes[1] << endl; else cout << a << endl; } const int INF = 0x3f3f3f3f; const int MAXM = 2e5; const int MAXN = 1e5 + 5; int n, T; int main(){ scanf("%d", &T); while(T --){ scanf("%d", &n); print(n & 1); } return 0; }