#include <bits/stdc++.h>
using namespace std;
const int N = 200;
int a[N], b[N], c[N];
int main() {
  int n;
  scanf("%d", &n);
  a[0] = 1;
  for (int i = 0; i < n; i++) {
    memcpy(c, b, sizeof b);
    for (int j = 1; j < N; j++) c[j] ^= a[j - 1];
    memcpy(b, a, sizeof a);
    memcpy(a, c, sizeof c);
  }
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d ", a[i]);
  printf("\n%d\n", n - 1);
  for (int i = 0; i < n; i++) printf("%d ", b[i]);
  puts("");
  return 0;
}
