#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
long long Abs(long long a) {
  if (a > 0) return a;
  return -a;
}
long long Ceil(long long a, long long b) {
  if (a % b == 0)
    return a / b;
  else
    return a / b + 1;
}
double Abs(double a) {
  if (a > 0) return a;
  return -a;
}
long long pow(long long x, long long y) {
  if (y == 0) return 1;
  long long tmp = pow(x, y / 2);
  if (y % 2 == 1) return ((tmp * tmp) * x);
  return (tmp * tmp);
}
int A[200][200] = {0};
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  A[0][0] = 1;
  A[1][1] = 1;
  for (int i = 2; i <= (n); ++i) {
    for (int j = 0; j <= (n); ++j) {
      A[i][j + 1] += A[i - 1][j];
    }
    for (int j = 0; j <= (n); ++j) {
      A[i][j] += A[i - 2][j];
      A[i][j] %= 2;
    }
  }
  cout << n << '\n';
  for (int i = 0; i <= (n); ++i) cout << A[n][i] << " ";
  cout << '\n';
  cout << n - 1 << '\n';
  for (int i = 0; i <= (n - 1); ++i) cout << A[n - 1][i] << " ";
  return 0;
}
