#include <bits/stdc++.h>
const int ans[52] = {
    0,          0,    3,    3,      3,     15,  3,       3,        29,
    17,         255,  5,    83,     4095,  43,  3,       63,       15,
    63,         63,   1023, 63,     3,     63,  27,      15,       4095,
    39,         4095, 5,    83,     15,    175, 1048575, 67108863, 5,
    1073741823, 63,   99,   262143, 57,    15,  63,      16383,    101,
    27,         303,  4095, 183,    65535, 1023};
int k;
int main() {
  scanf("%d", &k);
  for (int i = k - 1; i; --i) printf("%d ", ((long long)ans[k] >> i) & 1);
  printf("%d\n", ans[k] & 1);
  for (int i = 1; i < k; ++i) printf("1 ");
  puts("1");
  return 0;
}
