A tree with n nodes numbered from 1 to n is represented by
the parent array t. For each node i, the value t[i] is the
parent of node i, and t[i] = 0 means that node i is the root
of the tree.
Write a program that reads n and then the n values of the parent
array, and prints the index of the root.