public String toString(int level){
  StringBuilder sb=new StringBuilder();
  for (int i=0; i < level; i++) {
    sb.append(toString());
  }
  return sb.toString();
}

public String toString ( int level ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < level ; i ++ ) { sb . append ( toString ( ) ) ; } return sb . toString ( ) ; }
get indent sequence for level .
