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