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