#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b #define vl vector #define vii vector> #define vll vector> #define vvi vector> #define vvl vector> #define vvii vector>> #define vvll vector>> #define vst vector #define pii pair #define pll pair #define pb push_back #define all(x) (x).begin(),(x).end() #define mkunique(x) sort(all(x));(x).erase(unique(all(x)),(x).end()) #define fi first #define se second #define mp make_pair #define si(x) int(x.size()) const int mod=998244353,MAX=300005,INF=15<<26; int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); int N,K;cin>>N>>K; int a,b,c,d;cin>>a>>b>>c>>d;a--;b--;c--;d--; if(a+b>c+d){ swap(a,c); swap(b,d); } bool fa=false,fb=false; if(a>c){ fa=true; a=N-1-a; c=N-1-c; } if(b>d){ fb=true; b=N-1-b; d=N-1-d; } if(Kdist||(dist-K)%2){ cout<<-1<<"\n"; return 0; } int need=(dist-K)/2; for(int i=0;i=1&&z%2==1&&z<=2*need-1){ S[i][j]='.'; } } } if(fa){ reverse(all(S)); } if(fb){ for(int i=0;i