#3935. [Ontak2010 ]Keyboard

[Ontak2010 ]Keyboard

Description

Format

Input

Output

Samples

### Sample Input

3 3
ytr
hgf
dsa
.--
|||
|||
2