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