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