Problem: Suppose you have two polynomials <image> and <image>. Then polynomial <image> can be uniquely represented in the following way:

<image>

This can be done using [long division](https://en.wikipedia.org/wiki/Polynomial_long_division). Here, <image> denotes the degree of polynomial P(x). <image> is called the remainder of division of polynomial <image> by polynomial <image>, it is also denoted as <image>. 

Since there is a way to divide polynomials with remainder, we can define Euclid's algorithm of finding the greatest common divisor of two polynomials. The algorithm takes two polynomials <image>. If the polynomial <image> is zero, the result is <image>, otherwise the result is the value the algorithm returns for pair <image>. On each step the degree of the second argument decreases, so the algorithm works in finite number of steps. But how large that number could be? You are to answer this question. 

You are given an integer n. You have to build two polynomials with degrees not greater than n, such that their coefficients are integers not exceeding 1 by their absolute value, the leading coefficients (ones with the greatest power of x) are equal to one, and the described Euclid's algorithm performs exactly n steps finding their greatest common divisor. Moreover, the degree of the first polynomial should be greater than the degree of the second. By a step of the algorithm we mean the transition from pair <image> to pair <image>. 

Input

You are given a single integer n (1 ≤ n ≤ 150) — the number of steps of the algorithm you need to reach.

Output

Print two polynomials in the following format.

In the first line print a single integer m (0 ≤ m ≤ n) — the degree of the polynomial. 

In the second line print m + 1 integers between  - 1 and 1 — the coefficients of the polynomial, from constant to leading. 

The degree of the first polynomial should be greater than the degree of the second polynomial, the leading coefficients should be equal to 1. Euclid's algorithm should perform exactly n steps when called using these polynomials.

If there is no answer for the given n, print -1.

If there are multiple answer, print any of them.

Examples

Input

1


Output

1
0 1
0
1


Input

2


Output

2
-1 0 1
1
0 1

Note

In the second example you can print polynomials x2 - 1 and x. The sequence of transitions is

(x2 - 1, x) → (x, - 1) → ( - 1, 0).

There are two steps in it.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T1, class T2>
ostream &operator<<(ostream &s, pair<T1, T2> P) {
  return s << '<' << P.first << ", " << P.second << '>';
}
template <class T>
ostream &operator<<(ostream &s, vector<T> P) {
  for (int i = 0; i < P.size(); ++i) {
    if (i > 0) {
      s << " ";
    }
    s << P[i];
  }
  return s;
}
template <class T>
ostream &operator<<(ostream &s, vector<vector<T> > P) {
  for (int i = 0; i < P.size(); ++i) {
    s << endl << P[i];
  }
  return s << endl;
}
template <class T1, class T2>
ostream &operator<<(ostream &s, map<T1, T2> P) {
  for (__typeof__((P).begin()) it = (P).begin(); it != (P).end(); ++it) {
    s << "<" << it->first << "->" << it->second << "> ";
  }
  return s << endl;
}
const long long EPS = 0;
const long long SUM_UNITY = 0;
const long long MUL_UNITY = 1;
struct Polynomial : vector<long long> {
  Polynomial() : vector<long long>(1, SUM_UNITY) {}
  Polynomial(long long num) : vector<long long>(1, num) {}
  Polynomial(int size, long long num) : vector<long long>(size, num) {}
  Polynomial(vector<long long> vec) { *this = vec; }
  void init(long long num) { *this = vector<long long>(1, num); }
  void init(int size, long long num) { *this = vector<long long>(size, num); }
  void init(vector<long long> vec) { *this = vec; }
  Polynomial &normalize() {
    while ((*this).size() > 1 && abs((*this).back()) <= EPS) (*this).pop_back();
    return (*this);
  }
  inline Polynomial operator-() {
    for (int i = 0; i < (*this).size(); ++i) (*this)[i] = (*this)[i] * (-1);
    return (*this);
  }
  inline const Polynomial &operator+=(const Polynomial &x);
  inline const Polynomial &operator-=(const Polynomial &x);
  inline const Polynomial &operator*=(long long x);
  inline const Polynomial &operator*=(const Polynomial &x);
  inline const Polynomial &operator/=(long long x);
  inline const Polynomial &operator/=(const Polynomial &x);
  inline const Polynomial &operator%=(long long x);
  inline const Polynomial &operator%=(const Polynomial &x);
};
inline bool operator>(const Polynomial &x, const Polynomial &y) {
  return x.size() > y.size();
}
inline bool operator<(const Polynomial &x, const Polynomial &y) {
  return y > x;
}
inline bool operator<=(const Polynomial &x, const Polynomial &y) {
  return !(y < x);
}
inline bool operator>=(const Polynomial &x, const Polynomial &y) {
  return !(x < y);
}
inline bool operator!=(const Polynomial &x, const Polynomial &y) {
  return x < y || y < x;
}
inline bool operator==(const Polynomial &x, const Polynomial &y) {
  return !(x < y) && !(y < x);
}
ostream &operator<<(ostream &os, const Polynomial &x) {
  for (int i = (int)x.size() - 1; i >= 0; --i) {
    if (i != x.size() - 1)
      os << abs(x[i]);
    else
      os << x[i];
    if (i != 0) {
      os << "x";
      if (i != 1) os << "^" << i;
      os << " ";
      if (x[i - 1] < 0)
        os << "- ";
      else
        os << "+ ";
    }
  }
  return os;
}
inline Polynomial operator+(Polynomial x, Polynomial y) {
  while (x.size() > y.size()) y.push_back(0);
  while (y.size() > x.size()) x.push_back(0);
  Polynomial z((int)x.size(), 0);
  for (int i = 0; i < x.size(); ++i) z[i] = x[i] + y[i];
  return z.normalize();
}
inline Polynomial operator-(Polynomial x, Polynomial y) {
  y = -y;
  return x + y;
}
inline Polynomial operator*(Polynomial x, long long a) {
  Polynomial z((int)x.size(), 0);
  for (int i = 0; i < x.size(); ++i) z[i] = x[i] * a;
  return z.normalize();
}
inline Polynomial operator*(Polynomial x, Polynomial y) {
  Polynomial z((int)x.size() + (int)y.size() - 1, 0);
  for (int i = 0; i < x.size(); ++i)
    for (int j = 0; j < y.size(); ++j) z[i + j] = z[i + j] + x[i] * y[j];
  return z.normalize();
}
pair<Polynomial, long long> divmod(Polynomial x, long long a) {
  for (int i = (int)x.size() - 1; i >= 0; --i) x[i] = x[i] / a;
  x.normalize();
  return pair<Polynomial, long long>(x, 0);
}
Polynomial operator/(Polynomial x, long long a) { return divmod(x, a).first; }
long long operator%(Polynomial x, long long a) { return divmod(x, a).second; }
pair<Polynomial, Polynomial> divmod(Polynomial x, Polynomial y) {
  if (x.size() < y.size()) return make_pair(0, x);
  Polynomial q((int)x.size() - (int)y.size() + 1, 0);
  for (int i = (int)x.size() - 1; i >= y.size() - 1; --i) {
    long long div = x[i] / y.back();
    q[i - (int)y.size() + 1] = div;
    for (int j = 0; j < y.size(); ++j)
      x[i + j - (int)y.size() + 1] = x[i + j - (int)y.size() + 1] - y[j] * div;
  }
  return make_pair(q, x.normalize());
}
Polynomial operator/(Polynomial x, Polynomial y) { return divmod(x, y).first; }
Polynomial operator%(Polynomial x, Polynomial y) { return divmod(x, y).second; }
inline Polynomial pow(Polynomial a, long long n) {
  Polynomial res = 1;
  while (n > 0) {
    if (n & 1) {
      res = res * a;
    }
    a = a * a;
    n >>= 1;
  }
  return res;
}
Polynomial pow(Polynomial a, long long n, Polynomial PMOD) {
  a.normalize();
  PMOD.normalize();
  Polynomial res(1, 1);
  while (n > 0) {
    if (n & 1) {
      res = (res * a) % PMOD;
    }
    a = (a * a) % PMOD;
    n >>= 1;
  }
  return res;
}
Polynomial gcd(Polynomial x, Polynomial y) {
  x.normalize();
  y.normalize();
  if (y.size() == 1 && y.back() == 0)
    return x;
  else
    return gcd(y, x % y);
}
inline const Polynomial &Polynomial::operator+=(const Polynomial &x) {
  *this = *this + x;
  return *this;
}
inline const Polynomial &Polynomial::operator-=(const Polynomial &x) {
  *this = *this - x;
  return *this;
}
inline const Polynomial &Polynomial::operator*=(long long x) {
  *this = *this * x;
  return *this;
}
inline const Polynomial &Polynomial::operator*=(const Polynomial &x) {
  *this = *this * x;
  return *this;
}
inline const Polynomial &Polynomial::operator/=(long long x) {
  *this = *this / x;
  return *this;
}
inline const Polynomial &Polynomial::operator/=(const Polynomial &x) {
  *this = *this / x;
  return *this;
}
inline const Polynomial &Polynomial::operator%=(long long x) {
  *this = *this % x;
  return *this;
}
inline const Polynomial &Polynomial::operator%=(const Polynomial &x) {
  *this = *this % x;
  return *this;
}
Polynomial GenerateX() {
  Polynomial res(2, 0);
  res[1] = 1;
  return res;
}
const Polynomial EX = GenerateX();
int N;
Polynomial pol[210];
int main() {
  pol[0] = 1;
  pol[1] = EX;
  for (int dig = 2; dig < 200; ++dig) {
    pol[dig] = pol[dig - 1] * EX + pol[dig - 2];
    bool ok = true;
    for (int i = 0; i < pol[dig].size(); ++i)
      if (abs(pol[dig][i]) >= 2) ok = false;
    if (!ok) pol[dig] = pol[dig - 1] * EX - pol[dig - 2];
  }
  while (cin >> N) {
    cout << N << endl;
    for (int i = 0; i < pol[N].size(); ++i) {
      cout << pol[N][i];
      if (i != pol[N].size() - 1) cout << " ";
    }
    cout << endl;
    cout << N - 1 << endl;
    for (int i = 0; i < pol[N - 1].size(); ++i) {
      cout << pol[N - 1][i];
      if (i != pol[N - 1].size() - 1) cout << " ";
    }
    cout << endl;
  }
}