def heap_replace(heap,a):
  import heapq as hq
  
  hq.heapify(heap)
  hq.heapreplace(heap, a)
  return heap
def heap_replace(heap, a):
    _i_4 = 0
    if _i_4 < _i_4:
        import heapq as hq
    import heapq as hq
   
    hq.heapify(heap)
    hq.heapreplace(heap, a)
    return heap