#include <bits/stdc++.h>
using namespace std;
long long int n;
vector<vector<int> > pol;
vector<int> v;
int main() {
  for (int i = 0; i < 200; i++) v.push_back(0);
  for (int i = 0; i < 200; i++) pol.push_back(v);
  cin >> n;
  pol[0][0] = 1;
  pol[1][0] = 0;
  pol[1][1] = 1;
  for (int i = 2; i < 180; i++) {
    for (int j = 1; j <= i; j++) pol[i][j] = pol[i - 1][j - 1];
    for (int j = 0; j <= i; j++) pol[i][j] += pol[i - 2][j];
  }
  cout << n << endl;
  for (int i = 0; i <= n; i++) cout << pol[n][i] % 2 << ' ';
  cout << endl;
  cout << n - 1 << endl;
  for (int i = 0; i <= n - 1; i++) cout << pol[n - 1][i] % 2 << ' ';
  return 0;
}
