#include <bits/stdc++.h>
int a[] = {0,   0,  1,  1,  1,  2, 1,  1,  14, 8,  4,  2,  41,  13, 21, 1,  22,
           4,   19, 19, 4,  2,  1, 16, 13, 4,  35, 19, 4,  2,   41, 4,  87, 41,
           115, 2,  59, 31, 49, 8, 28, 4,  31, 44, 50, 13, 151, 16, 91, 56, 14},
    n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) printf("%d ", (long long)a[n] >> i & 1);
  puts("1");
  for (int i = 0; i < n; i++) printf("%d ", 1);
}
