#include<iostream>
#include<cstdio>
#include<queue>
using namespace std;
struct node{
int x,y;
};
int x,y,mx,my;
int a[400][400];
int vis[400][400];
int main(){
scanf("%d%d",x,y);
scanf("%d%d",mx,my);
a[mx][my]=0;
queue<node> q;
node s={0,0};
q.push(s);
vis[1][1]=1;
while(!q.empty()){
node t=q.front();
q.pop();
if(t.x==x&&t.y==y){
break;
}
if(t.x+1>=0&t.y+2>=0&t.x+1<=400&t.y+2<=400&!vis[t.x+1][t.y+2]){
vis[t.x+1][t.y+2]=vis[t.x][t.y]+1;
}
if(t.x+2>=0&t.y+1>=0&t.x+2<=400&t.y+1<=400&!vis[t.x+2][t.y+1]){
vis[t.x+2][t.y+1]=vis[t.x][t.y]+1;
}
if(t.x-1>=0&t.y+2>=0&t.x-1<=400&t.y+2<=400&!vis[t.x-1][t.y+2]){
vis[t.x-1][t.y+2]=vis[t.x][t.y]+1;
}
if(t.x+1>=0&t.y-2>=0&t.x+1<=400&t.y-2<=400&!vis[t.x+1][t.y-2]){
vis[t.x+1][t.y-2]=vis[t.x][t.y]+1;
}
if(t.x-1>=0&t.y-2>=0&t.x-1<=400&t.y-2<=400&!vis[t.x-1][t.y-2]){
vis[t.x-1][t.y-2]=vis[t.x][t.y]+1;
}
if(t.x+2>=0&t.y-1>=0&t.x+2<=400&t.y-1<=400&!vis[t.x+2][t.y-1]){
vis[t.x+2][t.y-1]=vis[t.x][t.y]+1;
}
if(t.x-2>=0&t.y+1>=0&t.x-2<=400&t.y+1<=400&!vis[t.x-2][t.y+1]){
vis[t.x-2][t.y+1]=vis[t.x][t.y]+1;
}
if(t.x-2>=0&t.y-1>=0&t.x-2<=400&t.y-1<=400&!vis[t.x-2][t.y-1]){
vis[t.x-2][t.y-1]=vis[t.x][t.y]+1;
}
}
for(int i=1;i<=x;i++){
for(int j=1;j<=y;j++){
printf("%d",a[i][j]);
}
}
return 0;
}