#include using namespace std; typedef complex P; int main() { int h, w; cin >> h >> w; vector s(h); vector

star(3); int cnt = 0; for (int i = 0; i < h; i++) { cin >> s[i]; for (int j = 0; j < w; j++) { if (s[i][j] == '*') star[cnt++] = P(i, j); } } while (true) { star[2] = P(rand() % h, rand() % w); P vec1 = star[1] - star[0]; P vec2 = star[2] - star[0]; if (vec1.real() * vec2.imag() - vec1.imag() * vec2.real() != 0) { s[star[2].real()][star[2].imag()] = '*'; for (int i = 0; i < h; i++) { cout << s[i] << endl; } return 0; } } return 0; }