#include <bits/stdc++.h>
using namespace std;
const int maxn = 155;
int m1[maxn][maxn];
void init() {
  memset(m1, 0, sizeof(m1));
  m1[1][1] = 1;
  m1[2][1] = 0;
  m1[2][2] = 1;
  for (int i = 3; i <= 151; i++) {
    int res = 1;
    for (int j = 1; j <= i; j++) {
      if (abs(m1[i - 2][j]) && m1[i - 1][j - 1] == 0) {
        m1[i][j] = m1[i - 2][j];
        continue;
      }
      if (m1[i - 2][j] == 0 && m1[i - 1][j - 1] != 0) {
        m1[i][j] = res * m1[i - 1][j - 1];
        continue;
      }
      if (m1[i - 2][j] == m1[i - 1][j - 1]) {
        res = -1;
      }
    }
  }
}
int main() {
  int n;
  init();
  while (cin >> n) {
    cout << n << endl;
    int rr = 1;
    if (m1[n + 1][n + 1] < 0) rr = -1;
    for (int i = 1; i < n + 1; i++) cout << m1[n + 1][i] * rr << " ";
    cout << m1[n + 1][n + 1] * rr << endl;
    rr = 1;
    if (m1[n][n] < 0) rr = -1;
    cout << n - 1 << endl;
    for (int i = 1; i < n; i++) cout << m1[n][i] * rr << " ";
    cout << m1[n][n] * rr << endl;
  }
}
