#include <bits/stdc++.h>
using namespace std;
int readInt() {
  int a;
  scanf("%d", &a);
  return a;
}
long long readLong() {
  long long a;
  scanf("%lld", &a);
  return a;
}
void readString(char *s) { scanf(" %s", s); }
string print(int a) { return to_string(a); }
string print(long long a) { return to_string(a); }
string print(string a) { return a; }
template <typename T1, typename T2>
string print(pair<T1, T2> first) {
  return "(" + print(first.first) + "," + print(first.second) + ")";
}
template <typename T>
string print(vector<T> v) {
  string ans = "[ ";
  for (T e : v) ans += print(e) + " ";
  ans += "]";
  return ans;
}
template <typename T>
string print(T *a, T *b) {
  string ans = "[ ";
  while (a != b) ans += print(*(a++)) + " ";
  ans += "]";
  return ans;
}
vector<vector<int>> poly;
int main() {
  poly.push_back({1});
  poly.push_back({0, 1});
  for (int i = (2); i <= (150); ++i) {
    bool found = false;
    int val[2] = {1, -1};
    for (int e : val) {
      vector<int> tmp(i + 1, 0);
      for (int j = (0); j <= (i - 1); ++j) tmp[j + 1] += e * poly[i - 1][j];
      for (int j = (0); j <= (i - 2); ++j) tmp[j] += poly[i - 2][j];
      bool good = true;
      for (int j = (0); j <= (i); ++j) {
        if (abs(tmp[j]) > 1) {
          good = false;
          break;
        }
      }
      if (!good) continue;
      found = true;
      poly.push_back(tmp);
      break;
    }
    if (found) {
    } else
      break;
  }
  int n = readInt();
  for (int i = (n); i >= (n - 1); --i) {
    printf("%d\n", i);
    if (poly[i][i] == -1) {
      for (int &e : poly[i]) e *= -1;
    }
    for (int e : poly[i]) printf("%d ", e);
    puts("");
  }
  return 0;
}
