def small_nnum(list1,n):
  import heapq
  
  smallest=heapq.nsmallest(n,list1)
  return smallest
def heap_queue_largest(nums,n):
  import heapq as hq
  
  largest_nums = hq.nlargest(n, nums)
  return largest_nums