#include <bits/stdc++.h>
using namespace std;
long long code[55];
int main() {
  code[2] = 3;
  code[3] = 5;
  code[4] = 9;
  code[5] = 9;
  code[6] = 3;
  code[7] = 63;
  code[8] = 195;
  code[9] = 275;
  code[10] = 915;
  code[11] = 915;
  code[12] = 2611;
  code[13] = 3663;
  code[14] = 4905;
  code[15] = 8477;
  code[16] = 42263;
  code[17] = 46301;
  code[18] = 152523;
  code[19] = 83037;
  code[20] = 831845;
  code[21] = 170737;
  code[22] = 1111991;
  code[23] = 3050503;
  code[24] = 4579817;
  code[25] = 26317917;
  code[26] = 30979523;
  code[27] = 26884341;
  code[28] = 82384431;
  code[29] = 244916347LL;
  code[30] = 265419143LL;
  code[31] = 28015089LL;
  code[32] = 3935961259LL;
  code[33] = 6555011733LL;
  code[34] = 2867143933LL;
  code[35] = 32008636087LL;
  code[36] = 33303739251LL;
  code[37] = 78648755319LL;
  code[38] = 31930463291LL;
  code[39] = 91901774607LL;
  code[40] = 595964220831LL;
  code[41] = 2103821103583LL;
  code[42] = 1482655433581LL;
  code[43] = 6866580818903LL;
  code[44] = 9713435264321LL;
  code[45] = 14429578238713LL;
  code[46] = 63037554304943LL;
  code[47] = 71254081985997LL;
  code[48] = 61636543673205LL;
  code[49] = 271438499698801LL;
  code[50] = 189349560653995LL;
  int k;
  cin >> k;
  long long val = code[k];
  long long rev = 0;
  for (int i = 0; i < (k); i++) {
    rev = (2 * rev) + val % 2;
    val /= 2;
  }
  for (int i = 0; i < (k); i++) {
    cout << (rev % 2) << " ";
    rev /= 2;
  }
  cout << endl;
  for (int i = 0; i < (k); i++) cout << "1 ";
  cout << endl;
  cin >> k;
  return 0;
}
