python
Code

# Code
```python3 []
class Solution:
    def minimumSum(self, A: List[int], ans = inf) -> int:
        n = len(A)
        for i in range(n):
            for j in range(i+1, n):
                for k in range(j+1, n):
                    if A[i] < A[j] > A[k]:
                        ans = min(ans, A[i] + A[j] + A[k])
        return ans if ans < inf else -1
```
['Python3']