#include <bits/stdc++.h>
int A[2][155] = {{1}, {0, 1}};
int main() {
  int n;
  std::cin >> n;
  for (int i = 2; i <= n; ++i)
    for (int j = i - 1; ~j; --j)
      A[i & 1][j + 1] = (A[i & 1][j + 1] + A[~i & 1][j]) & 1;
  printf("%d\n", n);
  for (int i = 0; i <= n; ++i) printf(i == n ? "%d\n" : "%d ", A[n & 1][i]);
  printf("%d\n", n - 1);
  for (int i = 0; i <= n - 1; ++i)
    printf(i == n - 1 ? "%d\n" : "%d ", A[~n & 1][i]);
  return 0;
}
