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