#include<iostream>
using namespace std;
int starta,starty,endx,endy,jx,jy,paojx,paojy;
void move()
{
cin>>startx>>starty>>endx>>endy;
if(row==true)
{
qipan[endx][endy]=qipan[startx][starty];
qipan[startx][starty]=" ";
}
else
{
cout<<"WRONG\n";
}
}
bool panduan()
{
int gx=endx-startx,gy=endy-starty;
if(gx<0) gx=-gx;
if(gy<0) gy=-gy;
bool row=true;
if(qipan[startx][starty]=="马"&&gx>gy&&qipan[startx+1][starty]==" ")
row=true;
if(qipan[startx][starty]=="马"&&gx<gy&&qipan[startx][starty+1]==" ")
row=true;
if(qipan[startx][starty]=="馬"&&gx>gy&&qipan[startx+1][starty]==" ")
row=true;
if(qipan[startx][starty]=="馬"&&gx<gy&&qipan[startx][starty+1]==" ")
row=true;
if(qipan[startx][starty]=="车"||qipan[startx][starty]=="車")
for(int i=startx;i<=endx;i++)
for(int j=startx;j<=endx;j++)
if(qipan[i][j]!=" ")
row=false;
if(qipan[startx][starty]=="相"&&qipan[startx-(startx-endx)/2][starty-(starty-endy)/2]==" ")
row=true;
if(qipan[startx][starty]=="象"&&qipan[startx-(startx-endx)/2][starty-(starty-endy)/2]==" ")
row=true;
if(qipan[startx][starty]=="炮"&&qipan[endx][endy]!=" ")
{
row=false;
for(int i=0;i<9;i++)
for(int j=0;j<9;j++)
{
if(qipan[i][j]!=" ")
{
row=true;
}
}
}
if(qipan[startx][starty]=="炮"&&qipan[endx][endy]==" ")
{
for(int i=0;i<9;i++)
for(int j=0;j<9;j++)
{
if(qipan[i][j]!=" ")
{
row=false;
}
}
}
row=true;
}
int main()
{
string qipan[9][9]={
"车","马","相","士","帅","士","相","马","车\n",
" "," "," "," "," "," "," "," "," \n",
" ","炮"," "," "," "," "," ","炮"," \n",
"兵"," ","兵"," ","兵"," ","兵"," ","兵\n",
" "," "," "," "," "," "," "," "," \n",
"卒"," ","卒"," ","卒"," ","卒"," ","卒\n",
" ","炮"," "," "," "," "," ","炮"," \n",
" "," "," "," "," "," "," "," "," \n",
"車","馬","象","仕","将","仕","象","馬","車"};
move();
return 0;
}