using System;
public class Program
{
private static string mostFrequentWord(string[] words) {
int frequency = 0;
int size = words.Length;
string frequent_word = "";
for (int i = 0; i < size; i++) {
int count = 1;
for (int j = i + 1; j < size; j++) {
if (words[j].Equals(words[i])) {
count++;
}
}
if (count >= frequency) {
frequent_word = words[i];
frequency = count;
}
}
return frequent_word;
}
public static void Main(string[] args)
{
string[] arr = new string[] {"java", "c++", "c", "c#", "c", "go", "php", "java", "java", "c", "python", "php", "c"};
string frequent_word = mostFrequentWord(arr);
Console.WriteLine(frequent_word);
}
}
/*
run:
c
*/