Each worker receives their salary several times during the year. Output the surnames of the workers along with their total salaries at the end of the year, sorted in ascending order by surname.
Each line contains information about a worker: their surname and the salary they received. The same worker may appear in the list multiple times, which means they received their salary multiple times throughout the year.
Print the surnames and the total salaries received by each worker during the entire year, in ascending order by surname. For each surname, output the sum of all salaries they received.
Example 1