#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 155;
int A[N][N];
void init() {
  A[0][0] = 1;
  A[1][0] = 0, A[1][1] = 1;
  A[2][0] = 1, A[2][1] = 0, A[2][2] = 1;
  for (int i = 3; i <= 150; ++i) {
    for (int j = i; j >= 1; --j) A[i][j] = A[i - 1][j - 1];
    for (int j = i - 2; j >= 0; --j) A[i][j] += A[i - 2][j];
    bool del = false;
    for (int j = i; j >= 0; --j)
      if (A[i][j] > 1 || A[i][j] < -1) {
        del = true;
        break;
      }
    if (del == true) {
      for (int j = i; j >= 1; --j) A[i][j] -= 2 * A[i - 1][j - 1];
      for (int j = i; j >= 0; --j) A[i][j] = -A[i][j];
    }
  }
}
int main() {
  init();
  int n;
  scanf("%d", &n);
  printf("%d\n", n);
  for (int i = 0; i <= n; ++i) printf("%d%s", A[n][i], i == n ? "\n" : " ");
  printf("%d\n", n - 1);
  for (int i = 0; i < n; ++i)
    printf("%d%s", A[n - 1][i], i == n - 1 ? "\n" : " ");
  return 0;
}
