eolymp
bolt
Try our new interface for solving problems
Problems

Worker and Salary 2

Worker and Salary 2

Each worker got his salary. This salary was changed during the year. Print surnames of the workers with their final salary at the end of the year in increasing order of surname. \InputFile Each line contains information about worker: surname and his salary. If the same worker appears once more again, it means that his salary was changed. \OutputFile Print surnames and salaries of all workers at the end of the year in increasing order of surname.
Time limit 1 second
Memory limit 128 MiB
Input example #1
Sidorov 100
Mamedov 150
Mamedov 250
Sidorov 110
Ivanov 200
Petrov 120
Sidorov 160
Ivanov 270
Output example #1
Ivanov 270
Mamedov 250
Petrov 120
Sidorov 160
Author Mykhailo Medvediev