#include <bits/stdc++.h>
using namespace std;
const int N = 3e3;
int Map[N][N];
int main() {
  int n;
  while (cin >> n) {
    Map[0][0] = 1, Map[1][1] = 1;
    for (int i = 2; i <= n; i++) {
      for (int j = 0; j <= i; j++) Map[i][j] = Map[i - 2][j];
      for (int j = 1; j <= i; j++) {
        Map[i][j] = Map[i - 1][j - 1] + Map[i - 2][j];
        Map[i][j] %= 2;
      }
    }
    cout << n << endl;
    for (int i = 0; i <= n; i++) {
      if (i) cout << " ";
      cout << Map[n][i];
    }
    cout << endl;
    cout << n - 1 << endl;
    for (int i = 0; i <= n - 1; i++) {
      if (i) cout << " ";
      cout << Map[n - 1][i];
    }
    cout << endl;
  }
}
