using System;
using System.Linq;
// 2.find frequency of a alphabets in a word and print in order
//Input: bbssrsraatt
//Output : a2b2r2s3t2
public class Program
{
public static void Main()
string input = "bbssrsraatt";
var query = from m in input
group m by m into grouped
select new
key = grouped.Key,
count = grouped.Count()
};
foreach (var el in query.OrderBy(x => x.key))
Console.Write(el.key);
Console.Write(el.count.ToString());
}