using System;
using System.Collections.Generic;
using System.Linq;
public class MainClass {
public static void Main() {
string[] names = { "J", "P", "G", "Pa" };
IEnumerable filtered = Enumerable.Where(names,n => n.Contains("a"));
IEnumerable sorted = Enumerable.OrderBy(filtered, n => n.Length);
IEnumerable finalQuery = Enumerable.Select(sorted,n => n.ToUpper());
}
}