You have a basket containing ten apples. You have ten friends, who each desire an apple. You give each of your friends one apple.
Now all your friends have one apple each, yet there is an apple remaining in the basket.
You give an apple each to your first nine friends, and a basket with an apple to your tenth friend.
Each friend has an apple, and one of them has it in a basket.
(Alternative answer: one friend already had an apple and put it in the basket.)