#include <bits/stdc++.h>
using namespace std;
signed main() {
  std::vector<std::vector<long long>> f(151, std::vector<long long>(151, 0));
  f[0][0] = 1;
  f[1][0] = 1;
  f[1][1] = 1;
  for (long long i = 2; i <= 150; ++i) {
    for (long long j = 0; j <= i; ++j) {
      f[i][j] = ((f[i - 2][j]) + ((j != 0) ? (f[i - 1][j - 1]) : 0));
      f[i][j] %= 2;
    }
  }
  long long n;
  cin >> n;
  cout << n << "\n";
  for (long long i = 0; i <= n; ++i) {
    cout << f[n][i] << " ";
  }
  cout << "\n";
  cout << n - 1 << "\n";
  for (long long i = 0; i <= n - 1; ++i) {
    cout << f[n - 1][i] << " ";
  }
  cout << "\n";
}
