Added heap.py for Python 2 and 3.

Python 2 & 3 implementation. Very slow performance. It TLEs in Codeforces custom test with 10⁷ but it runs in time for small values around 10⁵.