#include <bits/stdc++.h>
using namespace std;
int n;
int q[200][200];
int main() {
  q[1][0] = 1;
  q[2][1] = 1;
  for (int i = 3; i <= 156; i++) {
    bool flag = false;
    for (int j = 1; j <= 156; j++) q[i][j] = q[i - 1][j - 1];
    for (int j = 0; j <= 156; j++) {
      if (q[i][j] - q[i - 2][j] > 1 || q[i][j] - q[i - 2][j] < -1) {
        flag = true;
        break;
      }
    }
    if (!flag)
      for (int j = 0; j <= 156; j++) q[i][j] -= q[i - 2][j];
    else
      for (int j = 0; j <= 156; j++) q[i][j] += q[i - 2][j];
  }
  scanf("%d", &n);
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d ", q[n + 1][i]);
  puts("");
  printf("%d\n", n - 1);
  for (int i = 0; i <= n - 1; i++) printf("%d ", q[n][i]);
  puts("");
  return 0;
}
