#include<iostream>
using namespace std;
int h,w,x,y,z,d;
int main() {
cin>>h>>w>>x>>y>>z>>d;
int u=1,v=0,cnt=0;
for(int i=1;i<=h*w;i++,u++){
if(u>w)u=1;
if(u1){
v++;
}
char c;
cin>>c;
if(v>=x && v<=y && u>=z && u<=d){
cout<<c;
if(ud)cout<<endl;
}
通过变量记录行列坐标,判断满足条件去输出和换行