"Given n sorted lists of integers as file input"
To me this means that the inputs are sorted, so it's a case of optimising the output. Somewhere along this line will do the dirty:
for each file
read the first number into a sorted list
end loop
while the list is non empty and the files have more items
write the first item in the sorted list to the output
if the item's file has more
read next item from file into sorted list
end if
end loop
You simply need to record which file each item comes from and have a sorted list that the items can be added into.
I will leave the implementation as an exercise for OP.