#include <iostream>

using namespace std;

int main()
{
    int a[4];
    char c[3]={'-','0','+'};
    char b[3];
    int count=-1;
    int num=0;
    int sum;
    cin>>sum;
    for(int i=3;i>0;i--)
    {
        a[i]=sum%10;
        sum=sum/10;
        if(!a[i])
            count=i-1;
    }
    a[0]=sum;
    for(int i=1;i>=-1;i-=2)
    {
        b[0]=c[i+1];
        for(int j=1;j>=-1;j-=2)
        {
            b[1]=c[j+1];
            for(int t=1;t>=-1;t-=2)
            {
                b[2]=c[t+1];
                if(a[0]+i*a[1]+j*a[2]+t*a[3]==7)
                {
                    if(!num)
                    {
                        cout<<a[0]<<b[0]<<a[1]<<b[1]<<a[2]<<b[2]<<a[3]<<"=7"<<endl;
                        if(count>=0)
                        {
                            b[count]='-';
                            cout<<a[0]<<b[i+1]<<a[1]<<b[j+1]<<a[2]<<b[t+1]<<a[3]<<"=7"<<" is also a valid solution."<<endl;
                        }
                    }
                    num++;
                }
            }
        }
    }
    if(num==1)
    {
        cout<<"This is the only valid solution."<<endl;
    }
    return 0;
}
