using System;
using System.Linq;
class Program
{
static void Main() {
string str = "aabbbbhhhhhhhdddefgggg88";
string longest_repeating_character = new string(str.Select((ch, index) => str.Substring(index).TakeWhile(e => e == ch))
.OrderByDescending(e => e.Count())
.First().ToArray());
Console.WriteLine(longest_repeating_character);
}
}
/*
run:
hhhhhhh
*/