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