There are 6 baskets on the table. Each basket has 17, 5, 1, 7, 12 and 8 apples. Sean chose fourth, Matt chose second, Olivia chose first, John chose third, Liam chose fifth, and Emma chose sixth. How many apples did John and Matt choose in total?