Modified the printer to suit needed result. Fixed bugs on generating the AST. Introduced uniqueIdentifier to avoid cycle while recursively parse the tree.