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