static void Main(string[] args) { var queryCnt = Convert.ToInt32(Console.ReadLine()); var stackQueue = new StackQueue(); var queryList = new List <string>(); for (int i = 0; i < queryCnt; i++) { var fullQuery = Console.ReadLine(); queryList.Add(fullQuery); } stackQueue.ProcessQuery(queryList); Console.ReadKey(); }