#923. Maze (BFS)
You get a grid with `.` and `#` cells. Find the smallest number of steps from the top-left to the bottom-right, moving in 4 directions. If it is impossible, print -1.
### Input
n m, then n lines.
### Output
A number.
Examples
Input
5 6 .##..# #..... #...#. .##.## #..#..
Output
-1
Input
5 5 ..... ##.#. ....# .#... .#...
Output
8
💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.