• + 0 comments
    if __name__ == '__main__':
        x = int(input())
        y = int(input())
        z = int(input())
        n = int(input())
        l_x = range(x+1)
        l_y = range(y+1)
        l_z = range(z+1)
        
        return_list = [[a, b, c] for a in l_x for b in l_y for c in l_z if a+b+c != n]
        print(return_list)