#include <iostream>
#include <cstdio>
using namespace std;
int main(void) {
    int a[4];
    for(int r = 0; r < 100000; r++) putchar('(');
    while(true) {
        cin >> a[0] >> a[1] >> a[2] >> a[3];
        if(a[0] == 0) break;
        
        printf("%d+%d+%d+%d\n", a[0], a[1], a[2], a[3]);
    }
}