using System.Collections.Generic;
public class Program
{
public void Case(string p)
{ Console.WriteLine(p.ToLower()); }
public static void Main()
// Makes list of strings with no def. size
List<string> myWords = new List<string>();
string s = Console.ReadLine();
while(s!="Exit")
myWords.Add(s); // Add to list
s = Console.ReadLine(); // Collect next word
}
myWords.ForEach(Case);
myWords.Reverse();