#include <bits/stdc++.h>
using namespace std;
long long x, y, z, a, b, c, m, n, k, q[10000], w[1000000], d, ww[1000],
    www[10000];
long long w1[200][200];
map<long long, long long> M, M1;
map<pair<long long, long long>, bool> h;
vector<pair<long long, long long> > v1;
long long inf = 1e9;
long long poww(long long x, long long y) {
  if (x == 0) return 0;
  if (x == 1) return 1;
  if (y == 0) return 1;
  if (y == 1) return x;
  long long d = poww(x, y / 2);
  if (y % 2) return x * d * d;
  return d * d;
}
long long ans;
long long w2[10003][103];
vector<long long> v[100030];
char s[100][1000];
void build(long long n1) {
  if (n1 > n) return;
  for (int i = n1; i >= 1; i--) {
    w1[n1][i] = w1[n1 - 1][i - 1];
  }
  for (int i = 0; i <= n1 - 2; i++) {
    w1[n1][i] += w1[n1 - 2][i];
    w1[n1][i] %= 2;
  }
  build(n1 + 1);
}
int main() {
  cin >> n;
  w1[0][0] = 1, w1[1][1] = 1;
  if (n >= 2) build(2);
  cout << n << endl;
  for (int i = 0; i <= n; i++) {
    cout << w1[n][i] << ' ';
  }
  cout << endl << n - 1 << endl;
  for (int i = 0; i <= n - 1; i++) {
    cout << w1[n - 1][i] << ' ';
  }
  return 0;
}
