#include using namespace std; int main() { int T; scanf("%d\n", &T); while (T--) { int n; scanf("%d", &n); printf("%d\n", n ^ 1); } return 0; }