https://freecodecenter.com/string-task-solution/
Codeforces 118A String Task solution in C/CPP