#include <iostream>

using namespace std;
int main(){


    int n;
    int car1;
    int carica1;
    int top1;
    int oficer1;
    int peshka1;
    int con1;
    cout << "car1=";
    cin >> car1;
    cout << "carica1=";
    cin >> carica1;
    cout << "top1=";
    cin >> top1;
    cout << "oficer1=";
    cin >> oficer1;
    cout << "peshka1=";
    cin >> peshka1;
    cout << "con1=";
    cin >> con1;
    int car2;
    int carica2;
    int top2;
    int oficer2;
    int peshka2;
    int con2;
    cout << "car2=";
    cin >> car2;
    cout << "carica2=";
    cin >> carica2;
    cout << "top2=";
    cin >> top2;
    cout << "oficer2=";
    cin >> oficer2;
    cout << "peshka2=";
    cin >> peshka2;
    cout << "con2=";
    cin >> con2;

   {car1==1;
    if(0<car1<2) (car1<n);

      cout  <<  "-" && car1-n;
   }
    {if  (0<car1<2) (car1>n);

      cout << "+" && car1+n;

  } carica1==1;
    {if (0<carica1<2) (carica1<n);

      cout << "-" && carica1-n;

    }{if (0<carica1<2) (carica1>n);

      cout << "+" && carica1+n;

    }top1==1;
    {if (0<top1<2) (top1<n);

      cout << "-" && top1-n;

    }{if (0<top1<2) (top1>n);

      cout << "+" && top1+n;

    }oficer1==1;
    {if (0<oficer1<2) (oficer1<n);

      cout << "-" && oficer1-n;

    }{if (0<oficer1<2) (oficer1>n);

      cout << "+" && oficer1+n;


    }peshka1==1;
    {if (0<peshka1<2) (peshka1<n);

      cout << "-" && peshka1-n;

    }{if (0<peshka1<2) (peshka1>n);

      cout << "+" && peshka1+n;

    }con1==1;
    {if (0<con1<2) (con1<n);

      cout << "-" && con1-n;

    }{if (0<con1<2) (con1>n);

      cout << "+" && con1+n;



   }car2==1;
    {if (0<car2<2) (car2<n);

      cout << "-" && car1-n;

    }{if (0<car2<2) (car2>n);

      cout << "+" && car2+n;

   }carica2==1;
    {if (0<carica2<2) (carica2<n);

      cout << "-" && carica2-n;

    }{if (0<carica2<2) (carica2>n);

      cout << "+" && carica2+n;

    }top2==1;
    {if (0<top2<2) (top2<n);

      cout << "-" && top2+n;

    }{if (0<top2<2) (top2>n);

      cout << "+" && top2+n;

    }oficer2==1;
    {if (0<oficer2<2) (oficer2<n);

      cout << "-" && oficer2-n;

    }{if (0<oficer2<2) (oficer2>n);

      cout << "+" && oficer2+n ;

    }peshka2==1;
    {if (0<peshka2<2) (peshka2<n);

      cout << "-" && peshka2-n;

    }{if (0<peshka2<2) (peshka2>n);

      cout << "+" && peshka2+n;

    }con2==1;
    {if (0<con2<2) (con2<n);

      cout << "-" && con2-n;

    }{if (0<con2<2) (con2>n);

      }cout << "+" && con2+n;


      cout <<n<<car1<<carica1<<top1<<oficer1<<peshka1<<con1<<car2<<carica2<<top2<<oficer2<<peshka2<<con2<< endl;






return 0;
}
