class Program
{
static void Main(string[] args)
{
int cnt = 0; int occ = 0;
Console.WriteLine("Enter string");
string str = Console.ReadLine();
char[] newstr = str.Distinct().ToArray();
for (int i = 0; i < newstr.Length; i )
{
cnt = 0; occ = 0;
while (cnt < str.Length)
{
if (newstr[i] == str[cnt]) { occ ; }
cnt ;
}
Console.WriteLine(" {0} = {1} ", newstr[i], occ);
}
Console.ReadLine();
}
}