Sitting in a station waiting room, Joisino is gazing at her train ticket.
The ticket is numbered with four digits A, B, C and D in this order, each between 0 and 9 (inclusive).
In the formula A op1 B op2 C op3 D = 7, replace each of the symbols op1, op2 and op3 with + or - so that the formula holds.
The given input guarantees that there is a solution. If there are multiple solutions, any of them will be accepted.

-----Constraints-----
 - 0≤A,B,C,D≤9
 - All input values are integers.
 - It is guaranteed that there is a solution.

-----Input-----
Input is given from Standard Input in the following format:
ABCD

-----Output-----
Print the formula you made, including the part =7.
Use the signs + and -.
Do not print a space between a digit and a sign.

-----Sample Input-----
1222

-----Sample Output-----
1+2+2+2=7

This is the only valid solution.
[{"code": "\nS = input()\n\na = int(S[0])\nb = int(S[1])\nc = int(S[2])\nd = int(S[3])\n\nif a+b+c+d==7:\n    print('{}+{}+{}+{}=7'.format(a,b,c,d))\nelif a+b+c-d==7:\n    print('{}+{}+{}-{}=7'.format(a,b,c,d))\nelif a+b-c+d==7:\n    print('{}+{}-{}+{}=7'.format(a,b,c,d))\nelif a+b-c-d==7:\n    print('{}+{}-{}-{}=7'.format(a,b,c,d))\nelif a-b+c+d==7:\n    print('{}-{}+{}+{}=7'.format(a,b,c,d))\nelif a-b+c-d==7:\n    print('{}-{}+{}-{}=7'.format(a,b,c,d))\nelif a-b-c-d==7:\n    print('{}-{}-{}-{}=7'.format(a,b,c,d))\nelif a-b-c+d==7:\n    print('{}-{}-{}+{}=7'.format(a,b,c,d))", "passed": true, "time": 0.24, "memory": 14236.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nimport itertools\nimport sys\nsys.setrecursionlimit(10**6)\n\na, b, c, d = [int(i) for i in str(input())]\n\nfor i, j, k in itertools.product([1, -1], repeat=3):\n    if a+b*i+c*j+d*k == 7:\n        break\n\nif i == 1:\n    i = \"+\"\nelse:\n    i = \"-\"\nif j == 1:\n    j = \"+\"\nelse:\n    j = \"-\"\nif k == 1:\n    k = \"+\"\nelse:\n    k = \"-\"\n\nprint((\"{}{}{}{}{}{}{}=7\".format(a, i, b, j, c, k, d)))\n", "passed": true, "time": 0.2, "memory": 14128.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nnum = list(input())\n\nop = ['+','-']\n\nfor op1 in op:\n    if op1 == '+':\n        res1 = int(num[0]) + int(num[1])\n    else:\n        res1 = int(num[0]) - int(num[1])\n    for op2 in op:\n        if op2 == '+':\n            res2 = res1 + int(num[2])\n        else:\n            res2 = res1 - int(num[2])\n        for op3 in op:\n            if op3 == '+':\n                res3 = res2 + int(num[3])\n            else:\n                res3 = res2 - int(num[3])\n\n            if res3 == 7:\n                ans = num[0]+op1+num[1]+op2+num[2]+op3+num[3]+\"=7\"\n                print(ans)\n                return \n", "passed": true, "time": 0.15, "memory": 14300.0, "status": "done"}, {"code": "ABCD = input()\n\nA = int(ABCD[0])\nB = int(ABCD[1])\nC = int(ABCD[2])\nD = int(ABCD[3])\n\nif 7 == A+B+C+D:\n    print(f'{A}+{B}+{C}+{D}=7')\nelif 7 == A+B+C-D:\n    print(f'{A}+{B}+{C}-{D}=7')\nelif 7 == A+B-C-D:\n    print(f'{A}+{B}-{C}-{D}=7')\nelif 7 == A-B-C-D:\n    print(f'{A}-{B}-{C}-{D}=7')\nelif 7 == A+B-C+D:\n    print(f'{A}+{B}-{C}+{D}=7')\nelif 7 == A-B-C+D:\n    print(f'{A}-{B}-{C}+{D}=7')\nelif 7 == A-B+C+D:\n    print(f'{A}-{B}+{C}+{D}=7')\nelif 7 == A-B+C-D:\n    print(f'{A}-{B}+{C}-{D}=7')\n", "passed": true, "time": 0.15, "memory": 14172.0, "status": "done"}, {"code": "# coding: utf-8\n# Your code here!\n\n\n\n\ndef insert_str(target, i, char):\n    return target[:i] + char + target[i:]\n\ndef calc(target, i):\n    nonlocal ans\n    \n    if ans != \"\":\n        return\n    \n    if i == 7:\n        if eval(target) == 7:\n            ans = target+\"=7\"\n            return ans\n        return\n    calc(insert_str(target, i, \"+\"), i+2)\n    calc(insert_str(target, i, \"-\"), i+2)\n        \nS = input()\nN = len(S)\nans = \"\"\ncalc(S, 1)\n\n\nprint(ans)\n\n\n\n\n", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "a,b,c,d=map(int,input())\nif a+b-c+d == 7:\n        print('%d+%d-%d+%d=7' %(a,b,c,d))\n        return\nelif a+b-c-d == 7:\n        print('%d+%d-%d-%d=7' %(a,b,c,d))\n        return\nelif a-b-c+d == 7:\n        print('%d-%d-%d+%d=7' %(a,b,c,d))\n        return\nelif a-b-c-d == 7:\n        print('%d-%d-%d-%d=7' %(a,b,c,d))\n        return\nelif a+b+c+d ==7:\n        print('%d+%d+%d+%d=7' %(a,b,c,d))\n        return\nelif a+b+c-d ==7:\n        print('%d+%d+%d-%d=7' %(a,b,c,d))\n        return\nelif a-b+c+d ==7:\n        print('%d-%d+%d+%d=7' %(a,b,c,d))\n        return\nelif a-b+c-d ==7:\n        print('%d-%d+%d-%d=7' %(a,b,c,d))\n        return", "passed": true, "time": 0.17, "memory": 14172.0, "status": "done"}, {"code": "s = input()\nans1=s[0]\n\ndef solve(i,tmp,ans):\n  nonlocal ans1\n  if i==3:\n    if tmp==7:\n      ans1=ans\n      return True\n    else:\n      return False\n  \n  if solve(i+1,tmp+int(s[i+1]),ans+\"+\"+s[i+1]): return True\n  if solve(i+1,tmp-int(s[i+1]),ans+\"-\"+s[i+1]): return True\n\nif solve(0,int(s[0]),ans1):\n  print(ans1+\"=7\")", "passed": true, "time": 0.15, "memory": 14064.0, "status": "done"}, {"code": "n=input()\n\nfor i in range(2 ** 3):\n    \n\n    co=[\"-\",\"-\",\"-\"]\n\n    for j in range(3):\n        if ((i>>j)&1):\n            co[2-j]=\"+\"\n\n    eq=n[0]+co[0]+n[1]+co[1]+n[2]+co[2]+n[3]\n\n\n    if eval(eq)==7:\n            ans=eq\n\nprint(ans,end=\"\")\nprint(\"=7\")\n", "passed": true, "time": 0.24, "memory": 14296.0, "status": "done"}, {"code": "def dfs(i,sum1,sum2):\n    nonlocal ans\n    #print(sum1,sum2)\n    if i == 4 and sum1 != 7:\n        return 0\n    elif i == 4 and sum1 == 7:\n        ans = sum2 + \"=7\"\n    else:\n        dfs(i + 1,sum1 - int(s[i]),sum2 + \"-\" +s[i])\n        dfs(i + 1,sum1 + int(s[i]),sum2 + \"+\" +s[i])\n\nans = \"\"\ns = input()\ndfs(1,int(s[0]),s[0])\nprint(ans)", "passed": true, "time": 0.19, "memory": 14364.0, "status": "done"}, {"code": "def kumiawase(S,op,i=0,x=0):\n  if i ==4:\n    if x == 7:\n      print(op+'=7')\n      return True\n    else:\n      return False\n  \n  if kumiawase(S,op+'+'+S[i],i+1,x+int(S[i])): return True\n  \n  if kumiawase(S,op+'-'+S[i],i+1,x-int(S[i])): return True\n               \nS = input()\n\nkumiawase(S,S[0],1,int(S[0]))", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "import itertools\nL = ['+', '-']\ns = list(input())\nfor l in itertools.product(L, repeat=3):\n  if 7 == eval(s[0]+l[0]+s[1]+l[1]+s[2]+l[2]+s[3]):\n    print(s[0]+l[0]+s[1]+l[1]+s[2]+l[2]+s[3]+'=7')\n    break", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "a,b,c,d=input()\ns='+-'\nfor p in s:\n for q in s:\n  for r in s:\n   f=a+p+b+q+c+r+d\n   if eval(f)==7:print(f+'=7');return", "passed": true, "time": 0.15, "memory": 14192.0, "status": "done"}, {"code": "# coding = SJIS\n\nn = str(input())\na = int(n[0])\nb = int(n[1])\nc = int(n[2])\nd = int(n[3])\n\nif a + b + c + d == 7:\n    ans = str(a) + \"+\" + str(b) + \"+\" + str(c) + \"+\" + str(d)\nelif a + b + c - d == 7:\n    ans = str(a) + \"+\" + str(b) + \"+\" + str(c) + \"-\" + str(d)\nelif a + b - c + d == 7:\n    ans = str(a) + \"+\" + str(b) + \"-\" + str(c) + \"+\" + str(d)\nelif a + b - c - d == 7:\n    ans = str(a) + \"+\" + str(b) + \"-\" + str(c) + \"-\" + str(d)\nelif a - b + c + d == 7:\n    ans = str(a) + \"-\" + str(b) + \"+\" + str(c) + \"+\" + str(d)\nelif a - b + c - d == 7:\n    ans = str(a) + \"-\" + str(b) + \"+\" + str(c) + \"-\" + str(d)\nelif a - b - c + d == 7:\n    ans = str(a) + \"-\" + str(b) + \"-\" + str(c) + \"+\" + str(d)\nelif a - b - c - d == 7:\n    ans = str(a) + \"-\" + str(b) + \"-\" + str(c) + \"-\" + str(d)\n\nprint(ans + \"=7\")", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}, {"code": "a,b,c,d = list(input())\nsign = '+-'\nfor i in range(2):\n    for j in range(2):\n        for k in range(2):\n            if eval(a+sign[i]+b+sign[j]+c+sign[k]+d)==7:\n                print(str(a+sign[i]+b+sign[j]+c+sign[k]+d)+'=7')\n                return", "passed": true, "time": 0.16, "memory": 14312.0, "status": "done"}, {"code": "from itertools import combinations\n\ns = input()\n\nans = ['-','-','-']\nfor i in range(4):\n    for comb in combinations(range(3),i):\n        temp = int(s[0])\n        for j in range(3):\n            if j in comb:\n                temp += int(s[j+1])\n            else:\n                temp -= int(s[j+1])\n        if temp==7:\n            for j in comb:\n                ans[j] = \"+\"\n            break \nprint(\"{a}{op1}{b}{op2}{c}{op3}{d}=7\".format(a=s[0],op1=ans[0],b=s[1],op2=ans[1],c=s[2],op3=ans[2],d=s[3]))", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "import itertools\n\nads = [\"+\",\"+\",\"+\",\"-\",\"-\",\"-\"]\ns = input()\nq = list(itertools.permutations(ads, 3))\n\nfor j in range(len(q)):\n    ans = int(s[0])\n    al = \"\"\n    for k in range(3):\n        if q[j][k] == \"+\":\n            ans += int(s[k+1])\n        else:\n            ans -= int(s[k+1])\n        al += q[j][k]\n        al += s[k+1]\n    if ans == 7:\n        print(s[0]+al+\"=7\")\n        break", "passed": true, "time": 0.23, "memory": 14096.0, "status": "done"}, {"code": "def main():\n    S = list(input())\n    A, B, C, D = list(map(int, S))\n    if A+B+C+D == 7:\n        print((\"{}+{}+{}+{}=7\".format(A, B, C, D)))\n        return\n    if A+B+C-D == 7:\n        print((\"{}+{}+{}-{}=7\".format(A, B, C, D)))\n        return\n    if A+B-C+D == 7:\n        print((\"{}+{}-{}+{}=7\".format(A, B, C, D)))\n        return\n    if A+B-C-D == 7:\n        print((\"{}+{}-{}-{}=7\".format(A, B, C, D)))\n        return\n    if A-B+C+D == 7:\n        print((\"{}-{}+{}+{}=7\".format(A, B, C, D)))\n        return\n    if A-B+C-D == 7:\n        print((\"{}-{}+{}-{}=7\".format(A, B, C, D)))\n        return\n    if A-B-C+D == 7:\n        print((\"{}-{}-{}+{}=7\".format(A, B, C, D)))\n        return\n    if A-B-C-D == 7:\n        print((\"{}-{}-{}-{}=7\".format(A, B, C, D)))\n        return\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "import itertools\nx = input()\nfor v in itertools.product([\"+\", \"-\"], repeat=3):\n    t = x[0]+v[0]+x[1]+v[1]+x[2]+v[2]+x[3]\n    if eval(t) == 7: break\nprint(t+\"=7\")", "passed": true, "time": 0.15, "memory": 14244.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, list(input())))\nif a + b + c + d == 7:\n    print((\"{}+{}+{}+{}=7\".format(a, b, c, d)))\nelif a + b + c - d == 7:\n    print((\"{}+{}+{}-{}=7\".format(a, b, c, d)))\nelif a + b - c + d == 7:\n    print((\"{}+{}-{}+{}=7\".format(a, b, c, d)))\nelif a - b + c + d == 7:\n    print((\"{}-{}+{}+{}=7\".format(a, b, c, d)))\nelif a + b - c - d == 7:\n    print((\"{}+{}-{}-{}=7\".format(a, b, c, d)))\nelif a - b - c + d == 7:\n    print((\"{}-{}-{}+{}=7\".format(a, b, c, d)))\nelif a - b + c - d == 7:\n    print((\"{}-{}+{}-{}=7\".format(a, b, c, d)))\nelif a - b - c - d == 7:\n    print((\"{}-{}-{}-{}=7\".format(a, b, c, d)))\n", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "a,b,c,d=input()\ns='+-'\nfor p in s:\n for q in s:\n  for r in s:\n   f=a+p+b+q+c+r+d\n   if eval(f)==7:print(f+'=7');return", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}, {"code": "N = input()\nn = str(N)\na = int(n[0])\nb = int(n[1])\nc = int(n[2])\nd = int(n[3])\n\nif a + b + c + d == 7:\n    ans = str(a) + \"+\" + str(b) + \"+\" + str(c) + \"+\" + str(d)\nelif a + b + c - d == 7:\n    ans = str(a) + \"+\" + str(b) + \"+\" + str(c) + \"-\" + str(d)\nelif a + b - c + d == 7:\n    ans = str(a) + \"+\" + str(b) + \"-\" + str(c) + \"+\" + str(d)\nelif a + b - c - d == 7:\n    ans = str(a) + \"+\" + str(b) + \"-\" + str(c) + \"-\" + str(d)\nelif a - b + c + d == 7:\n    ans = str(a) + \"-\" + str(b) + \"+\" + str(c) + \"+\" + str(d)\nelif a - b + c - d == 7:\n    ans = str(a) + \"-\" + str(b) + \"+\" + str(c) + \"-\" + str(d)\nelif a - b - c + d == 7:\n    ans = str(a) + \"-\" + str(b) + \"-\" + str(c) + \"+\" + str(d)\nelif a - b - c - d == 7:\n    ans = str(a) + \"-\" + str(b) + \"-\" + str(c) + \"-\" + str(d)\n\nprint(ans + \"=7\")", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "n = input()\nN = [int(i) for i in n]\nfor i in range(8):\n  n = format(i, '03b')\n  ans = N[0]\n  msg = str(N[0])\n  for j in range(3):\n    if n[j] == '0':\n      ans += N[j+1]\n      msg += '+' + str(N[j+1])\n    else:\n      ans -= N[j+1]\n      msg += '-' + str(N[j+1])\n  if ans == 7:\n    print(msg + \"=7\")\n    break", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "A,B,C,D = map(int,input())\ntfs = []\nrt = str(A)\nfor bt in (True, False):\n  for ct in (True, False):\n    for dt in (True, False):\n      tfs.append([bt,ct,dt])\nfor bt,ct,dt in tfs:\n  tmp=7-A\n  tmp = tmp-B if bt else tmp+B\n  tmp = tmp-C if ct else tmp+C\n  tmp = tmp-D if dt else tmp+D\n  if tmp == 0:\n    rt+=\"+\" if bt else \"-\"\n    rt+=str(B)\n    rt+=\"+\" if ct else \"-\"\n    rt+=str(C)\n    rt+=\"+\" if dt else \"-\"\n    rt+=str(D)\n    rt+=\"=7\"\n    break\n\nprint(rt)", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "n = input()\nN = [int(i) for i in n]\nfor i in range(8):\n  n = format(i, '03b')\n  ans = N[0]\n  msg = str(N[0])\n  for j in range(3):\n    if n[j] == '0':\n      ans += N[j+1]\n      msg += '+' + str(N[j+1])\n    else:\n      ans -= N[j+1]\n      msg += '-' + str(N[j+1])\n  if ans == 7:\n    print(msg + \"=7\")\n    break", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "# \u89e3\u304d\u76f4\u3057\ndef add(i, b):\n    if i:\n        return \"-\" + str(b)\n    else:\n        return \"+\" + str(b)\ndef main():\n    S = input()\n    a, b, c, d = int(S[0]), int(S[1]), int(S[2]), int(S[3])\n    ans = \"\"\n    for i in range(2):\n        for j in range(2):\n            for k in range(2):\n                if a + (-1)**i * b + (-1)**j * c + (-1)**k * d == 7:\n                    ans += str(a)\n                    ans += add(i, b)\n                    ans += add(j, c)\n                    ans += add(k, d)\n                    ans += \"=7\"\n                    print(ans)\n                    return\nmain()", "passed": true, "time": 0.14, "memory": 14380.0, "status": "done"}, {"code": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tC\n# CreatedDate:  2020-09-26 23:24:58 +0900\n# LastModified: 2020-09-26 23:33:37 +0900\n#\n\n\nimport os\nimport sys\n# import numpy as np\n# import pandas as pd\n\n\ndef main():\n    L = input()\n    if int(L[0]) + int(L[1]) + int(L[2]) + int(L[3]) == 7:\n        print((\"{}+{}+{}+{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) + int(L[1]) + int(L[2]) - int(L[3]) == 7:\n        print((\"{}+{}+{}-{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) + int(L[1]) - int(L[2]) + int(L[3]) == 7:\n        print((\"{}+{}-{}+{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) - int(L[1]) + int(L[2]) + int(L[3]) == 7:\n        print((\"{}-{}+{}+{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) + int(L[1]) - int(L[2]) - int(L[3]) == 7:\n        print((\"{}+{}-{}-{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) - int(L[1]) + int(L[2]) - int(L[3]) == 7:\n        print((\"{}-{}+{}-{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) - int(L[1]) - int(L[2]) + int(L[3]) == 7:\n        print((\"{}-{}-{}+{}=7\".format(L[0], L[1], L[2], L[3])))\n\n    elif int(L[0]) - int(L[1]) - int(L[2]) - int(L[3]) == 7:\n        print((\"{}-{}-{}-{}=7\".format(L[0], L[1], L[2], L[3])))\n\n\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "S = input()\nA,B,C,D = int(S[0]),int(S[1]),int(S[2]),int(S[3])\n\nif A+B+C+D == 7:\n  print(str(A) + \"+\" + str(B) + \"+\" + str(C) + \"+\" + str(D) + \"=7\")\n  \nelif A+B+C-D == 7:\n  print(str(A) + \"+\" + str(B) + \"+\" + str(C) + \"-\" + str(D) + \"=7\")\n  \nelif A+B-C+D == 7:\n  print(str(A) + \"+\" + str(B) + \"-\" + str(C) + \"+\" + str(D) + \"=7\")\n  \nelif A+B-C-D == 7:\n  print(str(A) + \"+\" + str(B) + \"-\" + str(C) + \"-\" + str(D) + \"=7\")\n  \nelif A-B+C+D == 7:\n  print(str(A) + \"-\" + str(B) + \"+\" + str(C) + \"+\" + str(D) + \"=7\")\n  \nelif A-B+C-D == 7:\n  print(str(A) + \"-\" + str(B) + \"+\" + str(C) + \"-\" + str(D) + \"=7\")\n  \nelif A-B-C+D == 7:\n  print(str(A) + \"-\" + str(B) + \"-\" + str(C) + \"+\" + str(D) + \"=7\")\n  \nelse:\n  print(str(A) + \"-\" + str(B) + \"-\" + str(C) + \"-\" + str(D) + \"=7\")", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "a, b ,c, d = input()\nS = '+-'\nfor i in S:\n    for j in S:\n        for k in S:\n            left = a + i + b + j + c + k + d\n            if eval(left) == 7:\n                print(left + '=7')\n                return", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "ABCD = list(input())\n\na, b, c, d = int(ABCD[0]), int(ABCD[1]), int(ABCD[2]), int(ABCD[3])\n\nif a+b+c+d == 7:\n    print('{0}+{1}+{2}+{3}=7'.format(a, b, c, d))\nelif a+b+c-d == 7:\n    print('{0}+{1}+{2}-{3}=7'.format(a, b, c, d))\nelif a+b-c+d == 7:\n    print('{0}+{1}-{2}+{3}=7'.format(a, b, c, d))\nelif a-b+c+d == 7:\n    print('{0}-{1}+{2}+{3}=7'.format(a, b, c, d))\nelif a-b-c+d == 7:\n    print('{0}-{1}-{2}+{3}=7'.format(a, b, c, d))\nelif a+b-c-d == 7:\n    print('{0}+{1}-{2}-{3}=7'.format(a, b, c, d))\nelif a-b+c-d == 7:\n    print('{0}-{1}+{2}-{3}=7'.format(a, b, c, d))\nelif a-b-c-d == 7:\n    print('{0}-{1}-{2}-{3}=7'.format(a, b, c, d))", "passed": true, "time": 0.14, "memory": 14364.0, "status": "done"}, {"code": "A = list(map(int, list(input())))\n\ndef sign(x):\n    return \"+\" if x == 1 else \"-\"\nfor i in [1,-1]:\n    for j in [1,-1]:\n        for k in [1,-1]:\n            if A[0] + A[1] * i + A[2] * j + A[3] * k == 7:\n                print(str(A[0]) + sign(i) + str(A[1]) + sign(j) +str(A[2]) + sign(k) + str(A[3]) + \"=7\")\n                return", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "n = input()\nN = [int(i) for i in n]\nfor i in range(8):\n  n = format(i, '03b')\n  ans = N[0]\n  msg = str(N[0])\n  for j in range(3):\n    if n[j] == '0':\n      ans += N[j+1]\n      msg += '+' + str(N[j+1])\n    else:\n      ans -= N[j+1]\n      msg += '-' + str(N[j+1])\n  if ans == 7:\n    print(msg + \"=7\")\n    break", "passed": true, "time": 0.13, "memory": 14252.0, "status": "done"}, {"code": "from itertools import product\n\n\nA, B, C, D = list(input())\nfor x, y, z in product([\"+\", \"-\"], repeat=3):\n    eqn = A + x + B + y + C + z + D\n    if eval(eqn) == 7:\n        print(f\"{eqn}=7\")\n        break", "passed": true, "time": 0.14, "memory": 14340.0, "status": "done"}, {"code": "def some(num):\n    return \"+\" if num==0 else \"-\"\n\n\ndef main():\n    a, b, c, d = map(int, input())\n    for i in range(2):\n        for j in range(2):\n            for v in range(2):\n                op1 = some(i); op2=some(j); op3=some(v)\n                if eval(f\"a{op1}b{op2}c{op3}d\") == 7:\n                    print(f\"{a}{op1}{b}{op2}{c}{op3}{d}=7\")\n                    return\n\n\nmain()", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}]