Syed Sarfaraz Akhtar's submission of REVSTR | CodeChef