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