topcoder; solve "NamingConvention" from SRM #638 (Div. 2)