#include <bits/stdc++.h>
using i8 = char;
using u8 = unsigned char;
using i16 = short int;
using u16 = unsigned short int;
using i32 = long int;
using u32 = unsigned long int;
using i64 = long long int;
using u64 = unsigned long long int;
using f32 = float;
using f64 = double;
using f80 = long double;
using namespace std;
int main(void) {
  i32 n;
  cin >> n;
  i32 p[160][160];
  for (i32 i = 0; i <= n; i++) p[0][i] = p[1][i] = 0;
  p[0][0] = p[1][1] = 1;
  for (i32 i = 2; i <= n; i++) {
    p[i][0] = p[i - 2][0];
    for (i32 j = 1; j <= n; j++) {
      p[i][j] = (p[i - 1][j - 1] + p[i - 2][j]) % 2;
    }
  }
  cout << n << endl;
  for (i32 i = 0; i <= n; i++) cout << p[n][i] << " ";
  cout << endl;
  cout << n - 1 << endl;
  for (i32 i = 0; i < n; i++) cout << p[n - 1][i] << " ";
  cout << endl;
  return 0;
}
