Problem solved by me at hackerearth