class foo {}
class bar extends foo {}
class baz extends bar {}
class socko extends baz {}
class dewey extends socko {}
class cheatem extends dewey {}
class howe extends cheatem {}

public class ch11ex1 {
  static void printHierarchy(Class c) {
    while(c != null) {
      System.out.println(c.getName());
      c = c.getSuperclass();
    }
  }
  public static void main(String args[]) {
    howe h = new howe();
    printHierarchy(h.getClass());
  }
}
