#include <bits/stdc++.h>
using namespace std;
const int maxn = 152;
int previ[maxn];
int curr[maxn];
int temp[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  previ[0] = 1;
  curr[1] = 1;
  for (int i = 0; i < n - 1; i++) {
    temp[0] = 0;
    for (int j = 0; j <= i + 1; j++) {
      temp[j + 1] = curr[j];
    }
    for (int j = 0; j <= i; j++) {
      temp[j] = (temp[j] + previ[j]) % 2;
    }
    for (int j = 0; j <= i + 2; j++) {
      previ[j] = curr[j];
      curr[j] = temp[j];
    }
  }
  cout << n << endl;
  for (int i = 0; i <= n; i++) {
    cout << curr[i] << " ";
  }
  cout << endl;
  cout << n - 1 << endl;
  for (int i = 0; i <= n - 1; i++) {
    cout << previ[i] << " ";
  }
}
