#include <bits/stdc++.h>
using namespace std;
int ma[200][200];
int main() {
  int n;
  scanf("%d", &n);
  memset(ma, 0, sizeof(ma));
  ma[0][0] = 1;
  ma[1][0] = 0, ma[1][1] = 1;
  for (int i = 2; i <= n; i++) {
    int c = 1;
    for (int j = 1; j <= i - 2; j++)
      if (abs(ma[i - 1][j - 1] + ma[i - 2][j]) > 1) {
        c = -1;
        break;
      }
    for (int j = 1; j <= i; j++) {
      ma[i][j] = ma[i - 1][j - 1] + ma[i - 2][j] * c;
    }
    ma[i][0] = ma[i - 2][0] * c;
  }
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d%c", ma[n][i], i == n ? '\n' : ' ');
  printf("%d\n", n - 1);
  for (int i = 0; i < n; i++)
    printf("%d%c", ma[n - 1][i], i == n - 1 ? '\n' : ' ');
}
