function Node(data) {
this.data = data === undefined ? null : data;
this.next = null;
}
function sortedMerge(first, second) {
let a = new Node()
const dummy = a
while(first && second ){
if( first.data <second.data){
a.next = first
first = first.next
}
else{
a.next= second
second= second.next
}
a= a.next
}
if(first){
a.next=first
}
if(second){
a.next = second
}
return dummy.next
}