#include using namespace std; #ifdef TEMPURA #else #define debug(...) ((void)0) #define msg(...) ((void)0) #endif #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = (int)(m); i < (int)(n); i++) using ll = long long; using ull = unsigned long long; using i128 = __int128_t; template inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } template inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } // #include // using mint = atcoder::modint998244353; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, k; cin >> n >> k; int sr, sc, tr, tc; cin >> sr >> sc >> tr >> tc; --sr; --sc; --tr; --tc; int mi = abs(sr - tr) + abs(sc - tc); int ma = mi % 2 == 0 ? 2 * mi : 2 * mi - 1; if(k < mi || k > ma) { cout << -1 << endl; return 0; } rep(i, n) { rep(j, n) { if(i < min(sr, tr) || i > max(sr, tr) || j < min(sc, tc) || j > max(sc, tc)) { if((i + j) % 2 == (sr + sc) % 2) { cout << '.'; } else { cout << '#'; } } else { int d = abs(i - sr) + abs(j - sc); if(d % 2 == 0) { cout << '.'; } else if(d < k - mi) { cout << '#'; } else { cout << '.'; } } } cout << "\n"; } return 0; }