new_contents: # Time:  O(logn)
  # Space: O(1)
  
  class Solution(object):
      def nextGreatestLetter(self, letters, target):
          """
          :type letters: List[str]
          :type target: str
          :rtype: str
          """
          i = bisect.bisect_right(letters, target)
          return letters[0] if i == len(letters) else letters[i]
  
subject: Create find-smallest-letter-greater-than-target.py