#include <bits/stdc++.h>
using namespace std;
int dp[201][201];
int main() {
  int n;
  scanf("%d", &n);
  dp[0][0] = dp[1][1] = 1;
  for (int i = 2; i <= n; i++) {
    dp[i][0] = dp[i - 2][0];
    for (int j = 1; j <= i; j++)
      dp[i][j] = (dp[i - 2][j] + dp[i - 1][j - 1]) % 2;
  }
  printf("%d\n", n);
  for (int i = 0; i <= n; i++) printf("%d ", dp[n][i]);
  printf("\n%d\n", n - 1);
  for (int i = 0; i < n; i++) printf("%d ", dp[n - 1][i]);
  return 0;
}
