Solved "Bot saves princess - 2" in the Hacker Rank system