Most urgent few

orders is a list of (priority, name) tuples with distinct priorities. Write urgent(orders, k) that returns the names of the k most urgent orders, most urgent first. k may exceed the number of orders.

urgent([(3, "bread"), (1, "cake"), (2, "rolls")], 2)  ->  ["cake", "rolls"]
import heapq

def urgent(orders, k):
    ...