private static void Run() { var factory = new Factory(); Input.SplitLines() .Select(line => Parser.Match(line)) .ToList() .ForEach(match => factory.AddInstruction(match)); while (factory.ActAllBots()) { continue; } Console.Out.WriteLine(factory.GetOutput(0).Value *factory.GetOutput(1).Value *factory.GetOutput(2).Value); Console.ReadKey(); }