Route#838

Route

1 second
64 megabytes
Very easy

You are given a table with rows and columns, where each cell contains a digit from to . Find a path from cell to cell (N, N) such that the sum of the digits in the visited cells is minimized. From any cell, you may only move either down or to the right.

Input

The first line contains the integer (2 \le N \le 250). Each of the next lines contains digits without spaces.

Output

Output lines, each with characters. The hash character (#) indicates that the route passes through the corresponding cell; a dot (.) indicates it does not. If there are multiple paths with the minimal sum, output any one of them.

Examples

Example 1

Loading
Loading