#include <bits/stdc++.h>
using namespace std;
int f[210][210], a = 1, n;
int main() {
  cin >> n;
  f[0][0] = f[1][1] = 1;
  for (int i = 2; i <= n; i++) {
    a = 1 - a;
    for (int j = 1; j <= i; j++) f[a][j] = (f[a][j] + f[1 - a][j - 1]) % 2;
  }
  cout << n << endl;
  for (int i = 0; i <= n; i++) cout << f[a][i] << " ";
  cout << endl << n - 1 << endl;
  for (int i = 0; i <= n - 1; i++) cout << f[1 - a][i] << " " << endl;
  return 0;
}
