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