#include <bits/stdc++.h>
using namespace std;
int n;
int a[205], b[205];
int main() {
  cin >> n;
  a[1] = 1;
  b[0] = 1;
  for (int i = 1; i < n; i++) {
    int tmp[205];
    for (int j = 0; j <= i; j++) {
      tmp[j] = a[j];
    }
    for (int j = i + 1; j > 0; j--) {
      a[j] = (a[j - 1] + b[j]) & 1;
    }
    a[0] = b[0];
    for (int j = 0; j <= i; j++) {
      b[j] = tmp[j];
    }
  }
  cout << n << endl;
  for (int i = 0; i < n + 1; i++) {
    cout << a[i] << " ";
  }
  cout << endl << n - 1 << endl;
  for (int i = 0; i < n; i++) {
    cout << b[i] << " ";
  }
  return 0;
}
