#include <bits/stdc++.h>
using namespace std;
deque<int> deq[200];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  deq[0].push_back(0);
  deq[1].push_back(1);
  for (int i = 2; i <= n + 1; i++) {
    deq[i] = deq[i - 1];
    deq[i].push_front(0);
    for (int j = 0; j < deq[i - 2].size(); j++) deq[i][j] += deq[i - 2][j];
  }
  cout << n << '\n';
  for (int i = 0; i < deq[n + 1].size(); i++) cout << deq[n + 1][i] % 2 << " ";
  cout << '\n';
  cout << n - 1 << '\n';
  for (int i = 0; i < deq[n].size(); i++) cout << deq[n][i] % 2 << " ";
  cout << '\n';
  return 0;
}
