The use of units is ubiquitous in science. Physics uses units to distinguish distance (e.g., meters, kilometers, etc.), weight (e.g., kilograms, grams), and many other quantities. Computer scientists have specialized units to describe storage capacity (e.g., kilobytes, megabytes, etc.). You are to write a program to display the conversion factors for a set of units.
Specifying the relationship between various units can be done in many different, but equivalent, ways. For example, the units for metric distance can be specified as the group of relationships between pairs for units: 1 km = 1000 m, 1 m = 100 cm, and 1 cm = 10 mm. An alternative set of pairs consists of: 1 km = 100000 cm, 1 km = 1000000 mm, and 1 m = 1000 mm. In either presentation, the same relationship can be inferred: 1 km = 1000 m = 100000 cm = 1000000 mm.
For this problem, the units are to be sorted according to their descending size. For example, among the length units cm, km, m, mm, km is considered the biggest unit since 1 km corresponds