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