iterator for n sorted lists