you give m x n matrix character box represent sideview box each cell box followingA stone a stationary obstacle Empty the box rotate 90 degree clockwise cause stone fall gravity each stone fall land obstacle stone box Gravity affect obstacle position inertia boxs rotation affect stone horizontal positionsIt guarantee stone box rest obstacle stone boxReturn n x m matrix represent box rotation describe Example 1input box Output Example 2input box Output Example 3input box Output Constraintsm boxlengthn boxilength1 m n 500boxij