#include <bits/stdc++.h>
using namespace std;
int f[210][210], x = 1, n;
int main() {
  scanf("%d", &n);
  f[0][0] = f[1][1] = 1;
  for (register int i = 2; i <= n; i++) {
    x = 1 - x;
    for (register int j = 1; j <= i; j++)
      f[x][j] = (f[x][j] + f[1 - x][j - 1]) % 2;
  }
  printf("%d\n", n);
  for (register int i = 0; i <= n; i++) printf("%d ", f[x][i]);
  puts("");
  printf("%d\n", n - 1);
  for (register int i = 0; i < n; i++) printf("%d ", f[1 - x][i]);
  return 0;
}
