def METHOD_NAME(n, s):
    """s is a tuple of length at most n"""
    if len(s) == n:
        return
    else:
        s_set = set(s)
        for i in range(n):
            if i not in s_set:
                yield s + (i,)