Apples and Pears

om has three boxes with fruits in his barn: one box with apples, one box with pears, and one box with both apples and pears. The boxes have labels that describe the contents, but none of these labels is on the right box.
How can Tom determine what each of the boxes contains, by taking only one piece of fruit from one box?
om takes a piece of fruit from the box with the labels 'Apples and Pears'. If it is an apple, then the label 'Apples' belongs to this box. The box that said 'Apples', then of course should not be labeled 'Apples and Pears', because that would mean that the box with 'Pears' would have been labeled correctly, and this is contradictory to the fact that none of the labels was correct. On the box with the label 'Apples' should be the label 'Pears'. If Tom had taken a pear, the reasoning would have been in a similar way.