using System;
using System.Linq;
using System.Collections;
public class Aggregate
{
public static void Main() =>
"THmomomowmiomwimidONE".Aggregate("",(a,b)=> Char.IsUpper(b)? a+=b : a).ToList().ForEach(Console.Write);
}