Karthik's submission of Matrix | CodeChef