A vertical cross-section of a bin is an R by C grid. Each cell is empty air (.), a fixed rock (#), or a sand grain (o). Gravity pulls every sand grain straight down within its own column: a grain falls until it rests on the floor (the bottom row), on a rock, or on another grain that has already settled. Rocks never move, and sand never moves sideways. Apply gravity until nothing else can fall, then report the grid. Row 0 is the top.
Input format
Line 1: two integers R and C.
Next R lines: each a string of C characters, each ., #, or o.
Output format
Print R lines, the settled grid in the same character encoding.
Constraints
- 1 <= R, C <= 100