'''
Created on Apr 22, 2016

@author: Dell
'''
from heapq import heapify, heappop

if __name__ == '__main__':

    h = heapify([[0],[1,2],[3,4,5,6],[6,6,7]])
    print(heappop([[0],[1,2],[3,4,5,6],[6,6,7]]))
    print(heappop([[0],[1,2],[3,4,5,6],[6,6,7]]))
    print(heappop([[0],[1,2],[3,4,5,6],[6,6,7]]))
    print(heappop([[0],[1,2],[3,4,5,6],[6,6,7]]))