#include <iostream>
using namespace std;
int main ()
{
    int bcar,bcari,btop,bkon,bofi,bpesh,qcar,qcari,qtop,qkon,qofi,qpesh;
    cin >> bcar >> bcari >> btop >> bkon >> bofi >> bpesh >> qcar >> qcari >> qtop >> qkon >> qofi >> qpesh;
    if (bcar > 1) cout << '-' << bcar - 1;
    if (bcar <= 1) cout << 1 - bcar;
    if (bcari > 1) cout << '-' << bcari - 1;
    if (bcari <= 1) cout << 1 - bcari;
    if (btop > 2) cout << '-' << btop - 2;
    if (btop <= 2) cout << 2 - btop;
    if (bkon > 2) cout << '-' << bkon - 2;
    if (bkon <= 2) cout << 2 - bkon;
    if (bofi > 2) cout << '-' << bofi - 2;
    if (bofi <= 2) cout << 2 - bofi;
    if (bpesh > 8) cout << '-' << bpesh - 8;

    if (bpesh <= 8) cout << 8 - bpesh;
    
    if (qcar > 1) cout << '-' << qcar - 1;
    if (qcar <= 1) cout << 1 - qcar;
    if (qcari > 1) cout << '-' << qcari - 1;
    if (qcari <= 1) cout << 1 - qcari;
    if (qtop > 2) cout << '-' << qtop - 2;
    if (qtop <= 2) cout << 2 - qtop;
    if (qkon > 2) cout << '-' << qkon - 2;
    if (qkon <= 2) cout << 2 - qkon;
    if (qofi > 2) cout << '-' << qofi - 2;
    if (qofi <= 2) cout << 2 - qofi;
    if (qpesh > 8) cout << '-' << qpesh - 8;
    if (qpesh <= 8) cout << 8 - qpesh;
    return 0;
}