#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n;
  cin >> n;
  vector<long long> v[155];
  v[0].push_back(1);
  v[1].push_back(0);
  v[1].push_back(1);
  for (i = 2; i <= n; i++) {
    v[i].push_back(0);
    for (j = 0; j < v[i - 1].size(); j++) {
      v[i].push_back(v[i - 1][j]);
    }
    for (j = 0; j < v[i - 2].size(); j++) {
      v[i][j] = v[i][j] + v[i - 2][j];
      if (v[i][j] == 2) v[i][j] = -1;
      if (v[i][j] == -2) v[i][j] = 1;
    }
  }
  cout << n << endl;
  for (j = 0; j < v[n].size(); j++) cout << v[n][j] << " ";
  cout << endl << n - 1 << endl;
  for (j = 0; j < v[n - 1].size(); j++) cout << v[n - 1][j] << " ";
}
