#include <bits/stdc++.h>
using namespace std;
int main() {
  const int max = 200;
  int length;
  scanf("%d", &length);
  vector<int> divisor(max, 0), remainder(max, 0), dividend(max, 0),
      subtrahend(max, 0);
  divisor[0] = 1;
  int power = 1;
  while (length > 0) {
    int factor = 1;
    subtrahend[0] = 0;
    for (int i = 0; i < power; i++) {
      subtrahend[i + 1] = divisor[i] * factor;
    }
    for (int i = 0; i < power + 1; i++) {
      dividend[i] = (subtrahend[i] + remainder[i]) % 2;
    }
    swap(remainder, divisor);
    swap(dividend, divisor);
    power++;
    length--;
  }
  power--;
  if (divisor[power] == -1 || remainder[power - 1] == -1) {
    printf("-1");
  } else {
    printf("%d\n", power);
    for (int i = 0; i <= power; i++) printf("%d ", divisor[i]);
    printf("\n%d\n", power - 1);
    for (int i = 0; i < power; i++) printf("%d ", remainder[i]);
  }
  return 0;
}
