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