using System;
using System.Collections.Generic;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
string input=Console.ReadLine();
char[] cha = input.ToCharArray();
Dictionary<char, int> dic = new Dictionary<char, int>();
for(int i = 0; i <= cha.Length - 1; i++)
{
if (dic.ContainsKey(cha[i]))
{
dic[cha[i]] += 1;
}
else
{
dic.Add(cha[i], 1);
}
}
foreach(KeyValuePair<char,int> item in dic)
{
Console.WriteLine("{0},{1}",item.Key,item.Value);
}
}
}
}