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