#include const int bit[25] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216}; int main() { int N; scanf("%d", &N); if (N % 2 != 0) { printf("No\n"); return 0; } int i, j, k, l, f[1024][1024] = {}; for (i = 0; i < bit[N]; i++) { for (j = 0, l = 0; j < N; j++) if ((i & bit[j]) != 0) l++; for (j = 0; j < bit[N]; j++) { for (k = 0; k < N; k++) if ((i ^ j) == bit[k]) break; if (k == N) printf("0 "); else if (l % 2 == k % 2) printf("1 "); else printf("-1 "); } printf("\n"); } fflush(stdout); return 0; }