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