def max_val(t): 
    """ t, tuple or list
    Each element of t is either an int, a tuple, or a list
    No tuple or list is empty
    Returns the maximum int in t or (recursively) in an element of t """ 
    maxVal = False
    
    def helper(obj):
        nonlocal maxVal
        for el in obj:
            if isinstance(el, int):
                if maxVal == False or maxVal < el:
                    maxVal = el
            else:
                helper(el)
                
    helper(t)
    return maxVal