#include <bits/stdc++.h>
using namespace std;
bitset<1000> a[1005];
int main() {
  int n, i, j;
  cin >> n;
  a[1] = 1;
  for (i = 2; i <= n + 1; i++) a[i] = (a[i - 1] << 1) ^ a[i - 2];
  cout << n << endl;
  for (i = 0; i <= n; i++) cout << a[n + 1][i] << ' ';
  cout << endl;
  cout << n - 1 << endl;
  for (i = 0; i <= n - 1; i++) cout << a[n][i] << ' ';
  return 0;
}
