#include #include #include #include #include using namespace std; int main() { int h, w; cin >> h >> w; vectorsky(h); for (int i = 0; i < h; i++){ cin >> sky[i]; } vector>star; for (int i = 0; i < h; i++)for (int j = 0; j < w; j++){ if (sky[i][j] == '*'){ star.push_back(make_pair(i,j)); } } if (star[0].first == star[1].first){ for (int i = 0; i < h; i++){ if (i != star[0].first){ sky[i][star[0].second] = '*'; break; } } } else if (star[0].second == star[1].second){ for (int i = 0; i < h; i++){ if (i != star[0].second){ sky[star[0].first][i] = '*'; break; } } } else{ sky[star[0].first][star[1].second] = '*'; } for (int i = 0; i < h; i++)cout << sky[i] << endl; return 0; }