#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; string s[110]; int main() { int h, w; cin >> h >> w; bool b = false; int x1, y1, x2, y2; for (int i = 0; i < h; i++) { cin >> s[i]; for (int j = 0; j < w; j++) { if (s[i][j] == '*') { if (!b) { x1 = i; y1 = j; b = true; } else { x2 = i; y2 = j; } } } } if (y1 == y2) { if (y1 != w - 1) { s[x1][y1 + 1] = '*'; } else { s[x1][y1 - 1] = '*'; } } else if (x1 == x2) { if (x1 != h - 1) { s[x1 + 1][y1] = '*'; } else { s[x1 - 1][y1] = '*'; } } else{ if (x1 != h - 1) { s[x1 + 1][y1] = '*'; } else { s[x1 - 1][y1] = '*'; } } for (int i = 0; i < h; i++) { cout << s[i] << endl; } return 0; }