problem A for 2014 qualifications