using System.Collections;
public static void Main()
Stack stack = new Stack();
string command = Console.ReadLine();
if (command == "exit") break;
stack.Push(Console.ReadLine());
if (f == true) stack.Pop();
Console.WriteLine(stack.Pop());
command = Console.ReadLine();