use priority queue to find n-best sequences