#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200;
struct Poly {
  int a[MAXN];
  void clear() { memset(a, 0, sizeof a); }
  bool check(int n) {
    for (int i = 0; i <= n; i++)
      if (abs(a[i]) > 1) return 0;
    return 1;
  }
} f[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  f[0].a[0] = 1;
  f[1].a[1] = 1;
  for (int i = 2; i <= n; i++) {
    Poly t;
    t.clear();
    for (int j = 0; j <= n; j++) {
      t.a[j] += f[i - 2].a[j];
      if (j) t.a[j] += f[i - 1].a[j - 1];
    }
    f[i] = t;
    if (t.check(n))
      f[i] = t;
    else {
      t.clear();
      for (int j = 0; j <= n; j++) {
        t.a[j] -= f[i - 2].a[j];
        if (j) t.a[j] += f[i - 1].a[j - 1];
      }
      f[i] = t;
    }
  }
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d ", f[n].a[i]);
  printf("\n%d\n", n - 1);
  for (int i = 0; i <= n - 1; i++) printf("%d ", f[n - 1].a[i]);
  putchar('\n');
  return 0;
}
