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