#include using namespace std; using ll = long long; #define F first #define S second #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() int n,c; void solve() { } void fillhand(vector &tmp, int it) { if (it == 1) { tmp[3][4] = '#'; tmp[2][4] = '#'; tmp[1][4] = '#'; } if (it == 2) { tmp[3][5] = '#'; tmp[2][6] = '#'; tmp[1][7] = '#'; } if (it == 3) { tmp[4][5] = '#'; tmp[4][6] = '#'; tmp[4][7] = '#'; } if (it == 4) { tmp[5][5] = '#'; tmp[6][6] = '#'; tmp[7][7] = '#'; } if (it == 5) { tmp[5][4] = '#'; tmp[6][4] = '#'; tmp[7][4] = '#'; } if (it == 6) { tmp[5][3] = '#'; tmp[6][2] = '#'; tmp[7][1] = '#'; } if (it == 7) { tmp[4][3] = '#'; tmp[4][2] = '#'; tmp[4][1] = '#'; } if (it == 8) { tmp[3][3] = '#'; tmp[2][2] = '#'; tmp[1][1] = '#'; } } void filltmp(vector &tmp, pair c) { for (int i=0; i<9; i++) for (int j=0; j<9; j++) tmp[i][j] = '.'; tmp[4][4] = '*'; fillhand(tmp, c.first); fillhand(tmp, c.second); } signed main() { cin >> n >> c; vector> a; vector tmp(9, ""); for (int i=0; i> tmp[j]; int first = -1; int second = -1; if (tmp[3][3] == '#') if (first == -1) first = 8; else second = 8; if (tmp[3][4] == '#') if (first == -1) first = 1; else second = 1; if (tmp[3][5] == '#') if (first == -1) first = 2; else second = 2; if (tmp[4][3] == '#') if (first == -1) first = 7; else second = 7; if (tmp[4][5] == '#') if (first == -1) first = 3; else second = 3; if (tmp[5][3] == '#') if (first == -1) first = 6; else second = 6; if (tmp[5][4] == '#') if (first == -1) first = 5; else second = 5; if (tmp[5][5] == '#') if (first == -1) first = 4; else second = 4; if (first > second) swap(first, second); a.push_back(make_pair(first, second)); } vector> xd{ {5, 6}, {5, 7}, {5, 8}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {6, 7}, {6, 8}, {1, 3}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {7, 8}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {1, 8}, {2, 8}, {1, 4}, {2, 3}, {2, 4}, {3, 8}, {3, 4} }; vector> caesar; for (int i=0; i