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