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