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