#C1003. GHCSC Lesson 5 Dictionary Exercise 6

GHCSC Lesson 5 Dictionary Exercise 6

Write a function build_placements that returns a dictionary where each key is a company and each value is a list of placements by people wearing shoes made by that company.

INPUT FORMAT

One line contains names of companies, each separated by a blank space.

OUTPUT FORMAT

For all companies, output a line contains the name of the company and the placements by people wearing shoes made by that company. The name of the company should be outputed in the dictionary order.

SAMPLE

INPUT

Saucony Asics Asics NB Saucony Nike Asics Adidas Saucony Asics

OUTPUT

Saucony 1 5 9
Asics 2 3 7 10
NB 4
Nike 6
Adidas 8