public static SortedList<char, int> fun(string str)
{
SortedList<char, int> slt = new SortedList<char, int>();
foreach (char item in str)
{
if (slt.ContainsKey(item))
slt[item]++;
else
slt.Add(item, 1);
}
int _max = slt.Max(p => p.Value);
int count = slt.Count-1;
for (int i = count; i >= 0; i--)
{
if (slt.Values[i] != _max)
slt.RemoveAt(i);
}
return slt;
}