text: class Solution:
      def kSmallestPairs(self, nums1, nums2, k):
          """
          :type nums1: List[int]
          :type nums2: List[int]
          :type k: int
          :rtype: List[List[int]]
          """
          return sorted(itertools.product(nums1, nums2), key=sum)[:k]