Sergey's submission of Encoding | CodeChef