using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.IO; public class Grupifail2{ public static void Main(string[] argumendid){ var lapsed=from rida in File.ReadAllLines("nimedlinnad.txt") let m=rida.Split(' ') select new{ eesnimi=m[0], linnanimi=m[1] }; File.WriteAllLines("vastus.txt", lapsed.OrderBy(laps => laps.linnanimi). Select(laps => laps.eesnimi+" "+laps.linnanimi)); } }