#include <bits/stdc++.h>
using namespace std;
int n;
int a[160], b[160], c[160];
int main() {
  int times, i;
  bool flag;
  scanf("%d", &n);
  a[0] = 1;
  b[1] = 1;
  for (times = 1; times < n; times++) {
    c[0] = 0;
    for (i = 1; i <= n; i++) c[i] = b[i - 1];
    for (i = 0; i <= n; i++) c[i] += a[i];
    flag = 1;
    for (i = 0; i <= n; i++)
      if (c[i] > 1 || c[i] < -1) flag = 0;
    if (flag) {
      for (i = 0; i <= n; i++) a[i] = b[i];
      for (i = 0; i <= n; i++) b[i] = c[i];
      continue;
    }
    c[0] = 0;
    for (i = 1; i <= n; i++) c[i] = b[i - 1];
    for (i = 0; i <= n; i++) c[i] -= a[i];
    for (i = 0; i <= n; i++) a[i] = b[i];
    for (i = 0; i <= n; i++) b[i] = c[i];
  }
  printf("%d\n", n);
  for (i = 0; i <= n; i++) printf("%d ", b[i]);
  printf("\n%d\n", n - 1);
  for (i = 0; i <= n - 1; i++) printf("%d ", a[i]);
}
