using System;
public class Program
{
public static void Main()
Console.WriteLine("Enter a number");
string str = Console.ReadLine();
int l = str.Length;
int i;
int max = 0;
char x = '0';
int j;
int temp = 0;
char[] a = str.ToCharArray();
for(i=0;i<l;i++)
temp = 0;
for(j=0;j<l;j++)
if(i==j)
a[i]=a[j];
}
else if(a[i]==a[j])
temp = temp+1;
x=a[i];
if(temp>max)
max = temp;
if(max==0)
Console.Write("No frequent digit found in the number");
else
Console.WriteLine("The most frequent digit is {0}",x);