def three_sum_problem(numbers, sum_val):
    """
        Returns a triplet (x1,x2, x3) in list of numbers if found, whose sum equals sum_val, or None
    """

    # Sort the given list of numbers
    # Time complexity: O(N.logN)
    numbers.sort()
    size = len(numbers)

    # Two nested loops
    # Time complexity: O(N^2)
    for i in range(size-3+1):
        # Reduce the problem to two sum problem
        two_sum = sum_val - numbers[i]
        
        # Initialize the two pointers
        left = i+1
        right = size-1
        
        # Search in the array until the two pointers overlap
        while left < right:
            curr_sum = numbers[left] + numbers[right]

            # Update the pointers
            if curr_sum < two_sum:
                left += 1
            elif curr_sum > two_sum:
                right -= 1
            else:
                # Return the numbers that form the desired triplet
                return "({},{},{})".format(numbers[i], numbers[left], numbers[right])
    
    # No triplet found
    return None