Problem:
Score : 300 points

Problem Statement

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 1

1222

Sample Output 1

1+2+2+2=7

This is the only valid solution.

Sample Input 2

0290

Sample Output 2

0-2+9+0=7

0 - 2 + 9 - 0 = 7 is also a valid solution.

Sample Input 3

3242

Sample Output 3

3+2+4-2=7

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoder_solve
{
    class Program
    {
        public const ulong mod = 1000000007;
        public static string s = Console.ReadLine();
        public static bool[]sss=new bool[5];
            
    static void Main(string[] args)
        {
            
            int[] ss = new int[10];
            for (int i = 0; i < s.Length; i++)
            {
                string a = "" + s[i];
                ss[i] = int.Parse(a);
            }

            string ans = ""+ss[0]; ;


            if (Dfs(0, ss, ss[0]))
            {
                for (int i = 1; i < s.Length; i++)
                {
                    if (sss[i-1]) ans += "+";
                    else ans += "-";
                    ans += ss[i];
                }
            }

            ans += "=7";

            //foreach (var ssss in sss) Console.WriteLine(ssss);
            Console.WriteLine(ans);
                
                

            



        }

        static public bool Dfs(int i,int[] ss,long sum)
        {
            if (i == s.Length-1) return sum==7;

            if (Dfs(i + 1, ss, sum + ss[i+1]))
            {
                sss[i] = true;
                return true;
            }

            if (Dfs(i + 1, ss, sum - ss[i+1])) 
            {
                sss[i] = false;
                return true;
            }

            return false;
        }

       
        static public long Input()
        {
            return long.Parse(Console.ReadLine());
        }

        static public string[] Input2()
        {
            return Console.ReadLine().Split();
        }
        
        static public long[] Input3()
        {
            string[] data = Console.ReadLine().Split();
            long[] res = new long[data.LongLength];
            for(long i = 0; i < data.LongLength; i++)
            {
                res[i] = long.Parse(data[i]);
            }
            return res;
        }
        public static long Choose(long n, long a)
        {
            long x = 1;
            long y = 1;
            for (long i = 0; i < a; i++)
            {
                x *= n - i;
                y *= i + 1;
            }
            return x / y;
        }

        public static long Gcd(long a, long b)
        {
            long x = Math.Max(a, b);
            long y = Math.Min(a, b);
            if (x % y == 0) return y;
            else return Gcd(y, x % y);
        }

        
       
    }
}