import Prog1Tools.IOTools;
public class Bindrusire{  
  //
  //
  //
  //
  public static int Next(int[ ] x){ 
    //
     int i = x.length-1;
    //
     while  ( (i >=0) && (x[i] == 1)) {
     x[i] = 0;
     i--;
     }
     //   Hier steht i auf dem ersten Element von links ungleich 0 oder auf -1. 
     //
     if (i >= 0) x[i] = 1;
     return i; }
 //   
 //
 public static void Ausgabe(int[  ] x) {
 int i = 0;
 while (i < x.length) {
    System.out.print(x[i]);
    i++; 
    }
 System.out.println( );     
 }     
  //
  // Die Deklarationen  enden.
  //
  public static void main(String[] args) {
  //
  int n, i;
  int[ ] x;//
  //
  // Deklaration von lokalen Variablen .
  //
  n = IOTools.readInteger("n einlesen " );
  x = new int[n];
  //
  Ausgabe(x);
  while  (Next(x) >= 0 )
   Ausgabe(x);
     }
  }
