The salary of each employee is given. You need to find the sum of the salaries they received over the year. Provide the list of employees in ascending order of their surnames, along with their total received salaries.
The input provides information for each employee in the format surname and salary. The number of employees is unknown. If an employee appears several times in the list, it means that this amount should be added to the employee's total salary.
Output the employees' surnames in ascending order with their total received salaries.
Example 1