implement print Syntax tree method