Gwen purchased 28 items, spending a total of $108. Balloons cost $3 each, bags of candy costs $4 and caps cost $5. As students walked by, she would give each student one of each. However, after 7 students, she found that she had run out of one of the items. How many of each item did Gwen purchase?