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