#include <iostream.h>
#include <fstream.h>
#include <string.h>

long N,br;
int a[1500000];
int tmp[20];
ofstream fout("signals.txt");

long power2 (int x) { return (1 << x); }

int check() {
  long sum=0,i,j,flag = 1;

  //for (int j = 1; j<=N;j++) cout << tmp[j]; cout << endl;

  for (i = N; i >= 1; i--) {
      sum = 0; int x = -1;
      for (j = N; j >= 1; j--)
        if (j != i) { x++; sum += tmp[j] * power2(x); }
      if (a[sum] == 1) { flag = 0; break; } else a[sum] = 2;
    }

  for (i = N; i >= 1; i--) {
      sum = 0; int x = -1;
      for (j = N; j >= 1; j--)
        if (j != i) { x++; sum += tmp[j] * power2(x); }
      if (!flag && a[sum] == 2) a[sum] = 0;
      else if (flag) a[sum] = 1;
    }

  if (flag) { br ++; for (int j = 1; j <= N;j++) fout << tmp[j]; fout << endl; }
}

int gen(int x) {
  if (x == 0) { check(); return 0; }
  tmp[N-x+1] = 0; gen(x-1);
  tmp[N-x+1] = 1; gen(x-1);
}

int main()
{
  cin >> N;
  fout << "Test case: " << N << " \n";
  gen(N);
  fout << br << endl;
  cout << "Test case: " << N << "completed!\n";
  //cin.get(); cin.get();
}
