#include #define rep(i, p, n) for (ll i = p; i < (ll)(n); i++) #define rep2(i, p, n) for (ll i = p; i >= (ll)(n); i--) using namespace std; using ll = long long; using ld = long double; const double pi = 3.141592653589793; const long long inf = 2 * 1e9; const long long linf = (1LL << 61); const ll mod1 = 1000000007; const ll mod2 = 998244353; template inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } template using priority_queue_rev = priority_queue, greater>; #include using namespace atcoder; using mint1 = modint1000000007; using mint2 = modint998244353; vector> base = {{0, -1}, {-1, 0}, {0, 1}, {1, 0}}; void solve() { ll n, k; ll sr, sc, tr, tc; cin >> n >> k >> sr >> sc >> tr >> tc; sr--; sc--; tr--; tc--; ll r = abs(sr - tr) + abs(sc - tc); if (!(k >= r && k <= r + (r / 2) * 2 && k % 2 == r % 2)) { cout << -1 << endl; return; } vector ans(n); rep(i, 0, n) { rep(j, 0, n) { ans[i] += '.'; } } rep(i, 0, n) { rep(j, 0, n) { if ((i + j) % 2 == 0) { ans[i][j] = '#'; } } } rep(i, min(sr, tr), max(sr, tr) + 1) { rep(j, min(sc, tc), max(sc, tc) + 1) { ans[i][j] = '.'; if ((i + j) % 2 != (sr + sc) % 2) { if (abs(i - sr) + abs(j - sc) < k - r) { ans[i][j] = '#'; } } } } rep(i, 0, n) { cout << ans[i] << endl; } } int main() { ////////////////// ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); ////////////////// // ll T; // cin >> T; // while (T--) solve(); return 0; }