#include <bits/stdc++.h>
using namespace std;
const int N = 205;
int v[N][N];
int n;
int main() {
  for (int i = 0; i < N; i++) {
    if (i < 2) {
      v[i][i] = 1;
      continue;
    }
    int sig = 1;
    for (int j = 1; j <= i; j++)
      if (v[i - 1][j - 1] + v[i - 2][j] < -1 ||
          v[i - 1][j - 1] + v[i - 2][j] > 1) {
        sig = -1;
        continue;
      }
    for (int j = 0; j <= i; j++)
      if (j)
        v[i][j] = v[i - 1][j - 1] + sig * v[i - 2][j];
      else
        v[i][j] = sig * v[i - 2][j];
    for (int j = 0; j <= i; j++) assert(v[i][j] <= 1 && v[i][j] >= -1);
  }
  scanf("%d", &n);
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d%c", v[n][i], i < n ? ' ' : '\n');
  printf("%d\n", n - 1);
  for (int i = 0; i <= n - 1; i++)
    printf("%d%c", v[n - 1][i], i < n - 1 ? ' ' : '\n');
  return 0;
}
