#include <bits/stdc++.h>
using namespace std;
const int N = 155, mo = 998244353;
int a[2][N];
bool nw;
void go() {
  int f = 1;
  for (int i = 0, p; i < N - 1; ++i) {
    p = a[nw ^ 1][i + 1] + f * a[nw][i];
    if (p < -1 || p > 1) f *= -1;
  }
  for (int i = 0; i < N - 1; ++i)
    a[nw ^ 1][i + 1] = f * a[nw ^ 1][i + 1] + a[nw][i];
  a[nw ^ 1][0] *= f;
}
int main() {
  int n;
  cin >> n;
  a[nw][0] = 1;
  for (int i = 1; i <= n; ++i) go(), nw ^= 1;
  int i;
  for (i = n; ~i; --i)
    if (a[nw][i]) {
      cout << i << endl;
      break;
    }
  for (int j = 0; j <= i; ++j) cout << a[nw][j] << ' ';
  cout << endl;
  nw ^= 1;
  for (i = n; ~i; --i)
    if (a[nw][i]) {
      cout << i << endl;
      break;
    }
  for (int j = 0; j <= i; ++j) cout << a[nw][j] << ' ';
  cout << endl;
  return 0;
}
