#include <bits/stdc++.h>
using namespace std;
int a[200], b[200], c[200];
int main() {
  int n;
  cin >> n;
  a[0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++) {
      c[j + 1] = a[j];
    }
    bool ok = true;
    for (int j = 0; j <= i; j++) {
      if (abs(c[j] + b[j]) > 1) ok = false;
    }
    if (ok) {
      for (int j = 0; j <= i; j++) b[j] += c[j];
    } else {
      for (int j = 0; j <= i; j++) b[j] = c[j] - b[j];
    }
    swap(a, b);
  }
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d%c", a[i], i == n ? '\n' : ' ');
  printf("%d\n", n - 1);
  for (int i = 0; i <= n - 1; i++)
    printf("%d%c", b[i], i == n - 1 ? '\n' : ' ');
}
