#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  if (k == 2) puts("1 1");
  if (k == 3) puts("1 0 1");
  if (k == 4) puts("0 0 1 1");
  if (k == 5) puts("1 1 1 0 1");
  if (k == 6) puts("1 0 0 1 1 1");
  if (k == 7) puts("1 1 1 0 1 1 1");
  if (k == 8) puts("1 0 0 0 1 1 0 1");
  if (k == 9) puts("1 0 1 1 0 1 1 0 1");
  if (k == 10) puts("0 0 0 0 0 0 1 0 0 1");
  if (k == 11) puts("0 0 1 1 0 1 0 1 1 0 1");
  if (k == 12) puts("0 1 0 0 0 1 0 1 1 1 0 1");
  if (k == 13) puts("1 1 1 1 0 0 0 0 1 1 0 1 1");
  if (k == 14) puts("0 1 1 1 1 0 0 0 0 0 1 1 1 1");
  if (k == 15) puts("1 1 1 1 0 1 0 1 1 0 1 1 0 0 1");
  if (k == 16) puts("1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1");
  if (k == 17) puts("0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 1");
  if (k == 18) puts("1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 1");
  if (k == 19) puts("0 1 0 1 0 0 0 0 1 0 1 1 1 0 1 1 1 0 1");
  if (k == 20) puts("1 0 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1");
  if (k == 21) puts("1 1 0 1 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1");
  if (k == 22) puts("0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 1");
  if (k == 23) puts("1 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 0 1 1");
  if (k == 24) puts("1 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1");
  if (k == 25) puts("1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1");
  if (k == 26) puts("0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 0 1");
  if (k == 27) puts("0 0 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0 1 1");
  if (k == 28) puts("0 0 1 1 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1");
  if (k == 29)
    puts("1 1 1 0 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0 1");
  if (k == 30)
    puts("1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1");
  if (k == 31)
    puts("0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1");
  if (k == 32)
    puts("0 1 1 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1");
  if (k == 33)
    puts("0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0 1");
  if (k == 34)
    puts("1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1");
  if (k == 35)
    puts(
        "0 0 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 0 "
        "1");
  if (k == 36)
    puts(
        "0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 "
        "1");
  if (k == 37)
    puts(
        "1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 "
        "1 1");
  if (k == 38)
    puts(
        "1 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 "
        "1 0 1");
  if (k == 39)
    puts(
        "0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 "
        "0 0 1 1");
  if (k == 40)
    puts(
        "1 0 1 1 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 "
        "1 1 0 1 1");
  if (k == 41)
    puts(
        "1 1 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 0 0 1 "
        "1 1 1 1 1 1");
  if (k == 42)
    puts(
        "0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 0 1 1 0 1 "
        "1 1 0 1 0 0 1");
  if (k == 43)
    puts(
        "0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 "
        "1 1 1 0 1 1 1 1");
  if (k == 44)
    puts(
        "1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 0 0 0 1 0 1 "
        "1 1 1 0 1 1 1 0 1");
  if (k == 45)
    puts(
        "0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 "
        "1 0 0 1 1 0 1 0 0 1");
  if (k == 46)
    puts(
        "1 1 0 1 0 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 "
        "0 1 1 1 0 1 0 1 0 1 1");
  if (k == 47)
    puts(
        "0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 "
        "0 1 1 1 1 0 0 0 0 0 0 1");
  if (k == 48)
    puts(
        "1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0 0 0 "
        "1 1 0 1 0 0 0 0 1 1 0 1 1");
  if (k == 49)
    puts(
        "0 0 0 0 1 0 1 1 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 0 1 0 0 0 0 "
        "0 1 1 0 0 1 0 1 1 1 0 1 0 1");
  if (k == 50)
    puts(
        "1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1 0 1 0 0 "
        "0 1 0 1 0 1 0 1 0 0 1 0 0 1 1");
  for (int i = 1; i <= k; ++i) printf((i > 1) ? " 1" : "1");
  puts("");
  return 0;
}
