Merge two sorted lists using iterators