input: Peterson 2 Smith 6 Baxter 1.35 Peterson 3.1 output: Baxter 1.35 Peterson 5.1 Smith 6.0