#include <bits/stdc++.h>
using namespace std;
vector<int> p[155];
int main() {
  int n;
  cin >> n;
  p[0].push_back(1);
  p[1].push_back(0);
  p[1].push_back(1);
  for (int i = 2; i <= n; i++) {
    p[i] = p[i - 2];
    p[i][0] = p[i - 2][0];
    for (int j = 1; j <= p[i - 1].size() - 2; j++)
      p[i][j] = (p[i - 1][j - 1] + p[i - 2][j]) % 2;
    p[i].push_back(p[i - 1][p[i - 1].size() - 2]);
    p[i].push_back(p[i - 1][p[i - 1].size() - 0 - 1]);
  }
  cout << n << endl;
  for (auto x : p[n]) cout << x << " ";
  cout << endl;
  cout << n - 1 << endl;
  for (auto x : p[n - 1]) cout << x << " ";
  return 0;
}
