#include #include #include #include #include namespace IO { template inline bool read (_T& x) { x = 0; _T y = 1; char c = getchar(); while ((c < '0' || '9' < c) && c != EOF) { if (c == '-') y = -1; c = getchar(); } if (c == EOF) return false; while ('0' <= c && c <= '9') x = x * 10 + c - '0', c = getchar(); x *= y; return true; } template inline _T input () { _T x = 0, y = 1; char c = getchar(); while ((c < '0' || '9' < c) && c != EOF) { if (c == '-') y = -1; c = getchar(); } if (c == EOF) return 0; while ('0' <= c && c <= '9') x = x * 10 + c - '0', c = getchar(); x *= y; return x; } }; using namespace IO; #define reg register #define MAX_N 100007 #define rep(i, l, r) for(int i = l; i <= r; ++i) #define lep(i, l, r) for(int i = l; i < r; ++i) #define irep(i, r, l) for(int i = r; i >= l; --i) #define ilep(i, r, l) for(int i = r; i > l; --i) typedef long long ll; int N; int f[MAX_N]; int main () { int T = input(); while (T--) { read(N); printf("%d\n", 1 ^ N); } return 0; }