#include #include #include using namespace std ; int main() { int w, h ; cin >> h >> w ; vector b(h) ; for (int i=0; i> b[i] ; for (int i=0; i 0) { if (b[at][i] == '.' && b[at-1][i] == 'o') { swap(b[at][i], b[at-1][i]) ; if (at < h-1) at++ ; } else { at-- ; } } } for (auto s : b) cout << s << endl ; }