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