input: from typing import List
  
  def minimum_split_cost(arr: List[int]) -> int:
      """
      Given an integer array arr of length n, the cost of an array is defined as the value of its first element. 
  
      For instance, the cost of [1,2,3] is 1 and the cost of [3,4,1] is 3.
  
      Your task is to divide arr into three separate contiguous subarrays.
  
      Return the minimum possible sum of the cost of these subarrays.
  
      Examples:
      >>> arr = [1,2,3,12]
      6
      >>> arr = [5,4,3]
      12
      >>> arr = [10,3,1,1]
      12
  
      Constraints:
      3 <= n <= 50
      1 <= arr[i] <= 50
      """
output:     
      n = len(arr)
      min_cost = float('inf')
      
      # Iterate through all possible ways to split arr into three contiguous subarrays
      for i in range(1, n - 1):
          for j in range(i + 1, n):
              # The cost of the three subarrays is the sum of the first element in each subarray
              cost = arr[0] + arr[i] + arr[j]
              # Update the minimum cost found so far
              if cost < min_cost:
                  min_cost = cost
                  
      return min_cost
  