
import java.io.*;

public class wBaum {

  static public void main(String[] args) {
    A a = new A();
    B b = new B();
    System.out.println();
    a.zeichnewBaum(5);
    System.out.println();
    System.out.println();
    System.out.println();
    b.zeichnewBaum(7);
    pause();
  }

   private static void pause() {
    try {
      System.in.read();
    }
    catch (IOException e) {
    }
  }  // pause

} // constr02




class A {

  public void zeichnewBaum(int hoehe) {
    String sStr = "I";
    String sBStr = " ";
    int j;
    for (int i=0; i<hoehe; i++) {
      sBStr = "          ";
      for (j=0; j<(hoehe-i); j++) {
        sBStr += " ";
      }
      System.out.println(sBStr+sStr);
      sStr += "II";
    }
    sBStr += "";
    for (j=0; j<(hoehe-1); j++) {
       sBStr += " ";
    }
    System.out.println(sBStr+"I");
  }

}


interface IzeichneWBaum {

  public abstract void zeichnewBaum(int hoehe);

}

class B implements IzeichneWBaum {

  public void zeichnewBaum(int hoehe) {
    String sStr = "I";
    String sBStr = " ";
    int j;
    for (int i=0; i<hoehe; i++) {
      sBStr = "          ";
      for (j=0; j<(hoehe-i); j++) {
        sBStr += " ";
      }
      System.out.println(sBStr+sStr);
      sStr += "II";
    }
    sBStr += "";
    for (j=0; j<(hoehe-1); j++) {
       sBStr += " ";
    }
    System.out.println(sBStr+"I");
  }


}




// abstract class B implements IzeichneWBaum {

