Олимпиадный тренинг

Задача 38783. Food stock - 2


Задача

Темы: Словари
Znayka from the Flower City invented the rocket. For the flight to the moon, it was decided to make a stock of a certain number of different products. After interviewing all the shorties, Znayka had a very large list in his hands, in which the wish of each shorty was written in the form of the name of the product and the number of packages. At the meeting, it was decided that it was not rational to take food with a total number of packages less than 50. Help the shorties determine which products do not need to be stocked. Print these products in lexicographic order (from a to z).

Input
The program receives a list of strings. Each string contains the name of the product, followed by a space followed by the number of packages that shorty indicated. The list ends with the word END!.

Imprint
Print the name of all unnecessary products in lexicographic order. Print each product on a separate line.
 
Examples
# Input Output
1
cookies 10
cookies 50
syrup 9
syrup 8
cookies 1
apples 2
END!
apples
syrup