def heap_replace(heap,a):
  import heapq as hq
  
  hq.heapify(heap)
  hq.heapreplace(heap, a)
  return heap
def heap_queue_largest(nums,n):
  import heapq as hq
  
  largest_nums = hq.nlargest(n, nums)
  return largest_nums