#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rnd64(
    chrono::high_resolution_clock::now().time_since_epoch().count());
long long power(long long a, long long m, long long mod) {
  long long ans = 1;
  while (m) {
    if (m % 2) {
      ans *= a;
      ans %= (mod);
    }
    a = (a * a) % (mod);
    m >>= 1;
  }
  return ans;
}
void init(long long* a, long long n, long long val) {
  for (long long i = 0; i < n; i++) a[i] = val;
}
void solve() {
  long long i, j, _;
  long long n;
  cin >> n;
  j = n;
  bitset<151> a, b(1);
  while (n--) {
    bitset<151> tmp = b;
    b <<= 1;
    b = b ^ a;
    a = tmp;
  }
  cout << j << endl;
  for (i = 0; i < j + 1; i++) cout << b[i] << " ";
  cout << endl;
  cout << j - 1 << endl;
  for (i = 0; i < j; i++) cout << a[i] << " ";
  cout << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
