static void Main(string[] args) { StringTrain x = new StringTrain(); string[] cars = { "AAAAA", "AAAAA", "AAAAA" }; Console.WriteLine(x.buildTrain(cars)); Console.ReadLine(); }