input: 
  from typing import List
  
  def merge_sort(A: List[int], B: List[int]) -> List[int]:
      """ Merge two lists A and B by comparing elements of A with elements of B, adding
      the smaller element to the result and moving the respective pointer to the next
      element. Continue this until elements from both lists are added in sorted order.
      Example:
      >>> merge_sort([3, 6, 8, 10, 11], [2, 5, 7, 12])
      [2, 3, 5, 6, 7, 8, 10, 11, 12]
      >>> merge_sort([1, 3, 5], [2, 4, 6])
      [1, 2, 3, 4, 5, 6]
      """
      result = []
      i, j = 0, 0
  
      while i < len(A) and j < len(B):
          if A[i] < B[j]:
              result.append(A[i])
              i += 1
          else:
              result.append(B[j])
              j += 1
  
      result += A[i:]
      result += B[j:]
      
      return result
  
output:     result = []
      i, j = 0, 0
  
      while i < len(A) and j < len(B):
          if A[i] < B[j]:
              result.append(A[i])
              i += 1
          else:
              result.append(B[j])
              j += 1
  
      result += A[i:]
      result += B[j:]
      
      return result