Mayank Agarwal smashed a century and helped India to score 273/3 at the end of day one of the second Test against South Africa on Thursday.