PriorityQueue unstable, updated to python3