Pakistan Test captain Shan Masood changed the record books with his brilliance and a memorable opening stand with his predecessor Babar Azam on Day 3 of the second Test against South Africa.