program main
	implicit none
    !character(4)::s
    integer::a,b,c,d,n
    read(*,*) n
    a=n/1000
    b=(n-a*1000)/100
    c=(n-a*1000 - b*100)/10
    d=(n-a*1000 -b*100 -c*10)
    if(a+b+c+d==7)then
    	write(*,'(i1,"+",i1,"+",i1,"+",i1,"=7")') a,b,c,d
    else if(a+b+c-d==7)then
    	write(*,'(i1,"+",i1,"+",i1,"-",i1,"=7")') a,b,c,d
    else if(a+b-c+d==7)then
    	write(*,'(i1,"+",i1,"-",i1,"+",i1,"=7")') a,b,c,d
    else if(a-b+c+d==7)then
    	write(*,'(i1,"-",i1,"+",i1,"+",i1,"=7")') a,b,c,d
    else if(a+b-c-d==7)then
    	write(*,'(i1,"+",i1,"-",i1,"-",i1,"=7")') a,b,c,d
    else if(a-b+c-d==7)then
    	write(*,'(i1,"-",i1,"+",i1,"-",i1,"=7")') a,b,c,d
    else if(a-b-c+d==7)then
    	write(*,'(i1,"-",i1,"-",i1,"+",i1,"=7")') a,b,c,d
    else
    	write(*,'(i1,"-",i1,"-",i1,"-",i1,"=7")') a,b,c,d
    end if
    stop
end program main