#include <bits/stdc++.h>
using namespace std;
deque<deque<int>> Hi;
void computeN(int n) {
  for (int i = 0; i < Hi[n - 1].size(); i++) {
    Hi[n].push_back(Hi[n - 1][i]);
  }
  Hi[n].push_front(0);
  for (int i = 0; i < Hi[n - 2].size(); i++) Hi[n][i] += Hi[n - 2][i];
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  Hi.resize(200);
  Hi[0].push_back(0);
  Hi[1].push_back(1);
  for (int i = 2; i <= 151; i++) {
    computeN(i);
  }
  cout << n << '\n';
  for (auto num : Hi[n + 1]) {
    cout << num % 2 << " ";
  }
  cout << '\n' << n - 1 << '\n';
  for (auto num : Hi[n]) {
    cout << num % 2 << " ";
  }
  return 0;
}
