PROGRAMMING:Path representation
When solving the single source shortest path problem, it is often used to record the path with the forward representation (all the paths from the source point to other points are logically a tree, and the source point is the root of the tree. Each node only needs to record its forward or parent node). The path information from a source point to other points has been calculated. Please read in the number of vertices and path information of the graph and output the path information from the source point to other points. Note that if the number of vertices of a graph is n, the number of each vertex is represented by an integer of 0 -- n-1.
###Input example:
The first line, a positive integer, represents the number of nodes in the graph. The second line is a path array path [], and the I value is the leading vertex number of vertex I. the source point has no leading vertex, marked as - 1, and the integer numbers are separated by spaces.
```in
eight
3 0 1 -1 5 3 2 5
0 1 2 3 4 5 6 7 (0-7 is the vertex number for description)
Explanation: No. 3 is the source point (no forward trend), No. 7's forward trend is No. 5, and No. 5's forward trend is No. 3... The schematic diagram is as follows:
3-->0-->1-->2-->6
\
->5-->4
\
->7
```
###Output example:
According to the number from small to large, output the path description from the source point to other points (one for each line).
```out
3-->0
3-->0-->1
3-->0-->1-->2
3-->5-->4
3-->5
3-->0-->1-->2-->6
3-->5-->7
```
answer:If there is no answer, please comment
###Input example:
The first line, a positive integer, represents the number of nodes in the graph. The second line is a path array path [], and the I value is the leading vertex number of vertex I. the source point has no leading vertex, marked as - 1, and the integer numbers are separated by spaces.
```in
eight
3 0 1 -1 5 3 2 5
0 1 2 3 4 5 6 7 (0-7 is the vertex number for description)
Explanation: No. 3 is the source point (no forward trend), No. 7's forward trend is No. 5, and No. 5's forward trend is No. 3... The schematic diagram is as follows:
3-->0-->1-->2-->6
\
->5-->4
\
->7
```
###Output example:
According to the number from small to large, output the path description from the source point to other points (one for each line).
```out
3-->0
3-->0-->1
3-->0-->1-->2
3-->5-->4
3-->5
3-->0-->1-->2-->6
3-->5-->7
```
answer:If there is no answer, please comment