import itertools

S = eval(input())

opt_list = list(itertools.product([0, 1], repeat=3)) #0:+を入れる, 1:-を入れる

res_opt = ['+', '+', '+']

for opt in opt_list:

    tmp = int(S[0])

    for i in range(3):

        if opt[i] == 0:

            tmp += int(S[i + 1])

            res_opt[i] = '+'

        else:

            tmp -= int(S[i + 1])

            res_opt[i] = '-'

    

    if tmp == 7:

        res = S[0] + res_opt[0] + S[1] + res_opt[1] + S[2] + res_opt[2] + S[3] + '=7'

        

print(res)
N = eval(input())







for x in ('+', '-'):

    for y in ('+', '-'):

        for z in ('+', '-'):

            res = int(N[0])

            

            if x == '+':

                res += int(N[1])

            else:

                res -= int(N[1])

                

            if y == '+':

                res += int(N[2])

            else:

                res -= int(N[2])

                

            if z == '+':

                res += int(N[3])

            else:

                res -= int(N[3])

                

            if res == 7:

                result = N[0] + x + N[1] + y + N[2] + z + N[3] + '=7'

                break

    

print(result)
import itertools

S = eval(input())
opt_list = list(itertools.product([0, 1], repeat=3))  # 0:+を入れる, 1:-を入れる
res_opt = ["+", "+", "+"]
for opt in opt_list:
    tmp = int(S[0])
    for i in range(3):
        if opt[i] == 0:
            tmp += int(S[i + 1])
            res_opt[i] = "+"
        else:
            tmp -= int(S[i + 1])
            res_opt[i] = "-"
    if tmp == 7:
        res = S[0] + res_opt[0] + S[1] + res_opt[1] + S[2] + res_opt[2] + S[3] + "=7"
print(res)

N = eval(input())
for x in ("+", "-"):
    for y in ("+", "-"):
        for z in ("+", "-"):
            res = int(N[0])
            if x == "+":
                res += int(N[1])
            else:
                res -= int(N[1])
            if y == "+":
                res += int(N[2])
            else:
                res -= int(N[2])
            if z == "+":
                res += int(N[3])
            else:
                res -= int(N[3])
            if res == 7:
                result = N[0] + x + N[1] + y + N[2] + z + N[3] + "=7"
                break
print(result)

-import itertools - -S = eval(input()) -opt_list = list(itertools.product([0, 1], repeat=3))  # 0:+を入れる, 1:-を入れる -res_opt = ["+", "+", "+"] -for opt in opt_list: -    tmp = int(S[0]) -    for i in range(3): -        if opt[i] == 0: -            tmp += int(S[i + 1]) -            res_opt[i] = "+" -        else: -            tmp -= int(S[i + 1]) -            res_opt[i] = "-" -    if tmp == 7: -        res = S[0] + res_opt[0] + S[1] + res_opt[1] + S[2] + res_opt[2] + S[3] + "=7" -print(res) +N = eval(input()) +for x in ("+", "-"): +    for y in ("+", "-"): +        for z in ("+", "-"): +            res = int(N[0]) +            if x == "+": +                res += int(N[1]) +            else: +                res -= int(N[1]) +            if y == "+": +                res += int(N[2]) +            else: +                res -= int(N[2]) +            if z == "+": +                res += int(N[3]) +            else: +                res -= int(N[3]) +            if res == 7: +                result = N[0] + x + N[1] + y + N[2] + z + N[3] + "=7" +                break +print(result)