using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
Stack<int> ss = new Stack<int>();
for (int i = 0; i < 5; i++)
ss.Push(int.Parse(Console.ReadLine()));
}
while (ss.Count > 0)
Console.Write(ss.Pop() + " ");
/*
Write a program, which reads from the console N integers and prints
them in reversed order. Use the Stack<int> class.
*/