printing out the class names and the object tables in the right recursive order