#include <bits/stdc++.h>
using namespace std;
int n;
int p[1010][1010];
void init() { p[0][0] = p[1][1] = 1; }
int main() {
  scanf("%d", &n);
  init();
  for (int i = 1; i != n; ++i) {
    for (int j = 0; j <= i; ++j) p[i + 1][j + 1] += p[i][j];
    for (int j = 0; j <= i - 1; ++j) p[i + 1][j] += p[i - 1][j];
    for (int j = 0; j <= i + 1; ++j) p[i + 1][j] %= 2;
  }
  int deg;
  for (deg = n; !p[n][deg]; --deg)
    ;
  printf("%d\n", deg);
  for (int i = 0; i <= deg; ++i) printf("%d%c", p[n][i], i == deg ? '\n' : ' ');
  for (deg = n - 1; !p[n - 1][deg]; --deg)
    ;
  printf("%d\n", deg);
  for (int i = 0; i <= deg; ++i)
    printf("%d%c", p[n - 1][i], i == deg ? '\n' : ' ');
}
