#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[202][202], b[202][202], c[202];
int F[10] = {-1, -1, 0, 0, 1, 1, 0, 0, 0, 0};
int P[10] = {1, -1, 1, -1, 1, -1, 0, 0, 0, 0};
int run(int x) {
  if (x == n) return 1;
  x++;
  for (int k = 0; k < 6; k++) {
    a[x][0] = F[k] * a[x - 1][0] + P[k] * b[x - 1][0];
    for (int i = 1; i <= x; i++) {
      a[x][i] = a[x - 1][i - 1] + F[k] * a[x - 1][i] + P[k] * b[x - 1][i];
    }
    bool flag = 1;
    for (int i = 0; i <= x; i++) {
      if (a[x][i] >= 2 || a[x][i] <= -2) {
        flag = 0;
        break;
      }
    }
    if (flag) {
      for (int i = 0; i < x; i++) b[x][i] = a[x - 1][i];
      if (run(x)) return 1;
    }
  }
  return 0;
}
int main() {
  cin >> n;
  a[1][1] = 1;
  b[1][0] = 1;
  if (run(1)) {
    cout << n << endl;
    for (int i = 0; i <= n; i++) {
      cout << a[n][i] << " ";
    }
    cout << endl;
    cout << n - 1 << endl;
    for (int i = 0; i < n; i++) {
      cout << b[n][i] << " ";
    }
    cout << endl;
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
