#include <iostream>

using namespace std;

int main()
{
    int A,B,C,D,m;
    int i=0;
    do
    {
        cin >> m ;
        A=m/1000;
        B=(m/100)%10;
        C=(m/10)%10;
        D=m%10;
    }
    while(A<0||A>9||B<0||B>9||C<0||C>9||D<0||D>9);
    if(A+B+C+D==7)
    {
        cout << A <<'+' << B << '+' << C << '+' << D << '=' <<7<<endl;
        i++;
    }
    if (A-B+C+D==7)
    {
        cout << A <<'-' << B << '+' << C << '+' << D << '=' <<7<<endl;
        if(i!=0)
            cout <<"is also a valid solution." <<endl;
        i++;
    }
    if (A+B-C+D==7)
    {
        cout << A <<'+' << B << '-' << C << '+' << D << '=' <<7<<endl;
        if(i!=0)
            cout <<"is also a valid solution." <<endl;
        i++;
    }
    if(A+B+C-D==7)
    {
        cout << A <<'+' << B << '+' << C << '-' << D << '=' <<7<<endl;
        if(i!=0)
            cout <<"is also a valid solution." <<endl;
        i++;
    }
    if(A-B-C+D==7)
    {
        cout << A <<'-' << B << '-' << C << '+' << D << '=' <<7<<endl;
        if(i!=0)
            cout <<"is also a valid solution." <<endl;
        i++;
    }
    if(A-B+C-D==7)
    {
        cout << A <<'-' << B << '+' << C << '-' << D << '=' <<7<<endl;
        if(i!=0)
            cout <<"is also a valid solution." <<endl;
        i++;
    }
    if(A+B-C-D==7)
    {
        cout << A <<'+' << B << '-' << C << '-' << D << '=' <<7<<endl;
        if(i!=0)
            cout <<"is also a valid solution." <<endl;
        i++;
    }
    if(A-B-C-D==7)
    {
        cout << A <<'-' << B << '-' << C << '-' << D << '=' <<7 <<endl;
        i++;
    }
    if(i==1)
        cout << "This is the only valid solution." <<endl;
    return 0;
}
