input: Write a function to merge two sorted linked lists.
  assert merge(list1, list2).data == 1  # Assuming list1 and list2 are defined linked lists starting with 1 and 2 respectively
  assert merge(None, list2) == list2
  assert merge(list1, None) == list1
  assert merge(None, None) == None
output: class ListNode:
      def __init__(self, x):
          self.val = x
          self.next = None
  
  def merge(l1, l2):
      if not l1:
          return l2
      if not l2:
          return l1
  
      if l1.val < l2.val:
          l1.next = merge(l1.next, l2)
          return l1
      else:
          l2.next = merge(l1, l2.next)
          return l2