Yet Another String Game

Problem Name:
Yet Another String Game
Site:CodeForces
Links:
Tags:
Problem setters: