Merge k sorted lists of size up to n, in Python, using time complexity of nlog(k).