For each line that starts with the same number I want to combine its contents
1 2472 1 664 2 2600 10 4135 10 5606 ...
1 2472 664 2 2600 10 4135 5606 ...