Comparing two lists and getting the index of the "matching pairs"

@tilman