public static int height2 (Tree T, Position v) {
    if (T.isExternal(v))
      return 0;
    else {
      int h = 0;
      Iterator children = T.children(v);
      while (children.hasNext())
	h = Math.max(h, height2(T, (Position) children.next()));
      return 1 + h;
    }
  }