Employee and Salary 2#263

Employee and Salary 2

1 second
128 megabytes
Easy (≈1000)

Each employee's salary is given. Their salary may change during the year. Provide the list of employees with their most recent salaries in alphabetical order by their last names.

Input

The information for each employee is provided in the format last name and salary. The number of employees is unknown. If an employee appears multiple times in the list, it means their salary has changed.

Output

Output the employees' last names in ascending order, along with the most recent salary they received.

Examples

Example 1

Loading
Loading