#include <bits/stdc++.h>
using namespace std;
void readi(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = v * 10 + c - '0';
  while (isdigit(c = getchar())) v = v * 10 + c - '0';
  x = v * f;
}
void readll(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = v * 10 + c - '0';
  while (isdigit(c = getchar())) v = v * 10 + c - '0';
  x = v * f;
}
void readc(char &x) {
  char c;
  while ((c = getchar()) == ' ')
    ;
  x = c;
}
void writes(string s) { puts(s.c_str()); }
void writeln() { writes(""); }
void writei(int x) {
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
void writell(long long x) {
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
long long qp(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  long long z = qp(x, y / 2);
  z = z * z % 1000000007;
  if (y & 1) z = z * x % 1000000007;
  return z;
}
int n, m, i, j, cnt, ia;
vector<int> f[166];
vector<int> add(vector<int> v1, vector<int> v2) {
  int i;
  if (v1.size() < v2.size()) swap(v1, v2);
  int g = 0, s;
  ia = 0;
  for (i = 0; i < v2.size(); i++) {
    if (g) ia = 1;
    if (cnt & 1)
      s = v1[i] - v2[i] + g;
    else
      s = v1[i] + v2[i] + g;
    v1[i] = s % 2;
  }
  for (i = v2.size(); i < v1.size(); i++) {
    if (g) ia = 1;
    s = v1[i] + g;
    v1[i] = s % 2;
  }
  return v1;
}
int main() {
  cin >> n;
  n++;
  f[1].push_back(1);
  f[2].push_back(0);
  f[2].push_back(1);
  for (i = 3; i <= n; i++) {
    vector<int> t = f[i - 1];
    reverse((t).begin(), (t).end());
    t.push_back(0);
    reverse((t).begin(), (t).end());
    f[i] = add(t, f[i - 2]);
  }
  cout << f[n].size() - 1 << endl;
  for (i = 0; i < f[n].size(); i++) cout << f[n][i] << ' ';
  cout << endl;
  cout << f[n - 1].size() - 1 << endl;
  for (i = 0; i < f[n - 1].size(); i++) cout << f[n - 1][i] << ' ';
  cout << endl;
  return 0;
}
