using System;
using System.Linq;
public class Test
{
public static void Main()
{
string[] yourArray = {"A", "B", "B"};
string majority = yourArray.GroupBy(x => x).OrderByDescending(g => g.Count()).First().Key;
Console.WriteLine(majority);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKIApwdWJsaWMgY2xhc3MgVGVzdAp7CiAgICAgICAgcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQogICAgICAgIHsKICAgICAgICAgICAgICAgIHN0cmluZ1tdIHlvdXJBcnJheSA9IHsiQSIsICJCIiwgIkIifTsKICAgICAgICAgICAgICAgIHN0cmluZyBtYWpvcml0eSA9IHlvdXJBcnJheS5Hcm91cEJ5KHggPT4geCkuT3JkZXJCeURlc2NlbmRpbmcoZyA9PiBnLkNvdW50KCkpLkZpcnN0KCkuS2V5OwogICAgICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUobWFqb3JpdHkpOwogICAgICAgIH0KfQ==