Problem C: 逆序输出

Memory Limit:256 MB Time Limit:2.500 S
Judge Style:Text Compare Creator:
Submit:105 Solved:48

Description

给定一个单链表,将里面的元素逆序输出。

Input

输入n+1个数,最后一个数字是-1代表结束。

Output

逆序输出这n个数。

Sample Input Copy

1 2 3 -1

Sample Output Copy

3 2 1

HINT

链表可能很大,1<=n<=2500000