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