#K88347. Restock Report
Restock Report
Restock Report
You are given an inventory list of items. Each item is described by a name (string), a quantity (integer), and a threshold (integer). An item requires restocking if its quantity is less than or equal to its threshold. In mathematical terms, an item needs restocking if $$quantity \leq threshold$$.
Your task is to output the names of all items that need restocking, arranged in lexicographical (alphabetical) order, for each test case.
inputFormat
The input consists of a single test case. The first line contains an integer N, representing the number of items in the inventory. This is followed by N lines, each containing a string and two integers separated by spaces: the item name, its quantity, and its threshold.
outputFormat
Output a single line containing the names of the items that need restocking, sorted alphabetically and separated by spaces. If there are no such items, output an empty line.## sample
3
apples 5 10
bananas 15 10
oranges 8 10
apples oranges