#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007LL;
long long large = 2000000000000000000LL;
int main() {
  vector<int> p(200, 0);
  vector<int> q(200, 0);
  p[0] = 1;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    vector<int> t(200, 0);
    for (int i = 1; i < 200; i++) {
      t[i] = p[i - 1];
    }
    bool flag = false;
    for (int i = 199; i >= 0; i--) {
      if (q[i] != 0 && t[i] != 0) {
        flag = true;
        if (q[i] != t[i]) {
          for (int j = 0; j < 200; j++) q[j] = -q[j];
        }
        for (int j = 0; j < 200; j++) {
          t[j] -= q[j];
        }
        break;
      }
    }
    if (!flag) {
      for (int i = 0; i < 200; i++) t[i] += q[i];
    }
    q = p;
    p = t;
  }
  cout << n << endl;
  for (int i = 0; i <= n; i++) {
    cout << p[i] << " ";
  }
  cout << endl;
  cout << n - 1 << endl;
  for (int i = 0; i < n; i++) {
    cout << q[i] << " ";
  }
  cout << endl;
  return 0;
}
