#include <bits/stdc++.h>
using namespace std;
const int MX = 305;
int n, a[MX], b[MX], c[MX];
int main() {
  scanf("%d", &n);
  a[1] = 0;
  a[2] = 1;
  b[1] = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= i; j++) c[j] = a[j];
    for (int j = 2; j <= i + 1; j++) a[j] = c[j - 1];
    a[1] = 0;
    for (int j = 1; j <= i - 1; j++) a[j] = a[j] ^ b[j];
    for (int j = 1; j <= i; j++) b[j] = c[j];
  }
  cout << n << endl;
  for (int i = 1; i <= n + 1; i++) cout << a[i] << " ";
  cout << endl;
  cout << n - 1 << endl;
  for (int i = 1; i <= n; i++) cout << b[i] << " ";
  cout << endl;
}
