String Task Codeforces Solution