#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
const int MAX_N = 155;
const int MAX_V = 0;
const int MAX_M = 0;
const int MAX_Q = 0;
int res[155][155];
int main() {
  int n;
  cin >> n;
  res[0][0] = 1;
  res[1][0] = 0;
  res[1][1] = 1;
  res[2][0] = -1;
  res[2][2] = 1;
  for (int i = 3; i < 152; i++) {
    res[i][0] = res[i - 2][0];
    for (int j = 1; j <= i; j++)
      res[i][j] = (res[i - 1][j - 1] + res[i - 2][j]) % 2;
  }
  cout << n << endl;
  for (int i = 0; i <= n; i++) {
    cout << res[n][i] << " ";
  }
  cout << endl << n - 1 << endl;
  for (int i = 0; i < n; i++) cout << res[n - 1][i] << " ";
  cout << endl;
}
