Dreamplay and the String Game

Problem Name:
Dreamplay and the String Game
Site:HackerRank
Links:
Tags:
Problem setters: