Tour Guides tour.X FJ has asked Betsy to lead a tour of visiting dignitaries around the farm. Betsy thinks of the farm as an NxN grid (1 <= N <= 5), where some areas (like the manure pile) are off-limits to visitors. Betsy wants to start the tour at the upper left corner of the grid and end at the lower left corner. Because she wants to make a good impression, she wants the tour to visit *every grid square* that isn't off-limits. Of course, to avoid boring them she'll only visit each grid square once. From a particular grid square, the tour can proceed left, right, up, or down to the next square. Help Betsy determine the number of different tours she could take the visitors on. Betsy knows that the upper left and lower left corner of the grid are never off-limits. Even so, there might not be any possible tours. PROBLEM NAME: tour INPUT FORMAT: * Line 1: A single integer N. * Lines 2..N+1: N lines of N character each mapping out the grid. Each character is either a dot (.), marking a visitable grid square, or a sharp (#), marking an off-limits grid square. SAMPLE INPUT: 4 .... #... #... .... INPUT DETAILS: The farm is a 4x4 grid with two off-limits squares. OUTPUT FORMAT: * Line 1: The number of possible tours Betsy might choose. SAMPLE OUTPUT: 4 OUTPUT DETAILS: Here are the four possible paths: abcd abgh abef abcd #kje #cfi #cdg #gfe #lif #dej #lkh #hij nmhg nmlk nmji nmlk