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