#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7;
int a[155], b[155], t[155], m;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  a[1] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i + 1; j++) t[j] = a[j];
    for (int j = i + 1; j >= 1; j--) a[j] = a[j - 1];
    for (int j = 1; j <= i; j++) {
      a[j] += b[j];
      if (a[j] == 2) a[j] = 0;
    }
    for (int j = 1; j <= i + 1; j++) b[j] = t[j];
  }
  cout << n << endl;
  for (int i = 1; i <= n + 1; i++) {
    if (i > 1) cout << ' ';
    cout << a[i];
  }
  cout << endl;
  cout << n - 1 << endl;
  for (int i = 1; i <= n; i++) {
    if (i > 1) cout << ' ';
    cout << b[i];
  }
  cout << endl;
  return 0;
}
