input: from typing import List
  
  def unique_substr(arr: List[str]) -> List[str]:
      """
      Given an array 'arr' with n non-empty strings, determine a new string array 'result' of the same size. 
  
      For each string arr[i], 'result[i]' must be the shortest substring that does not appear as a substring in any other string within 'arr'. If multiple shortest substrings are present, choose the lexicographically smallest. If no such substring can be found, 'result[i]' should be an empty string.
  
      Return the array 'result'.
  
      Examples:
      >>> arr = ["cab","ad","bad","c"]
      ["ab","","ba",""]
      >>> arr = ["abc","bcd","abcd"]
      ["","","abcd"]
  
      Constraints:
      n == arr.length
      2 <= n <= 100
      1 <= arr[i].length <= 20
      arr[i] consists only of lowercase English letters.
      """
output:     
      def is_unique_substr(substr: str, index: int, arr: List[str]) -> bool:
          for i, s in enumerate(arr):
              if i != index and substr in s:
                  return False
          return True
  
      def find_unique_substr(s: str, index: int, arr: List[str]) -> str:
          n = len(s)
          shortest_unique_substr = None
          for length in range(1, n + 1):
              for start in range(n - length + 1):
                  substr = s[start:start + length]
                  if is_unique_substr(substr, index, arr):
                      if shortest_unique_substr is None or len(substr) < len(shortest_unique_substr) or \
                              (len(substr) == len(shortest_unique_substr) and substr < shortest_unique_substr):
                          shortest_unique_substr = substr
          return shortest_unique_substr if shortest_unique_substr else ""
      
      result = []
      for i in range(len(arr)):
          result.append(find_unique_substr(arr[i], i, arr))
      
      return result
  