#include using namespace std; vector > pos; int main(){ int h, w; cin >> h >> w; char c[h][w]; for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ cin >> c[i][j]; if(c[i][j] == '*'){ pos.push_back(make_pair(i, j)); } } } bool ok = false; for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ if(ok == false){ if(i != pos[0].first || i != pos[1].first){ if(j != pos[0].second || j != pos[1].second){ cout << "*"; ok = true; }else{ cout << "-"; } }else if(j != pos[0].second || j != pos[1].second){ if(i != pos[0].first || i != pos[1].first){ cout << "*"; ok = true; }else{ cout << "-"; } }else{ printf("-"); } }else{ printf("%c", c[i][j]); } } cout << endl; } }