printing recursive types