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