Giving a binary tree, please find the pre-order traversal of the tree
pre-order
The first line of each case consists of two positive integers n (n<=100) and r denoting the number of nodes and the root of the tree. The next n line consists of three integers denoting the number of the node, left child, and right child (-1 denoting NULL).
Print the pre-order traversal of the tree.