package main

import (
	"fmt"
	"strings"
)

func UnsetArr(s []int, i int) []int {
	return append(s[:i], s[i+1:]...)
}

type Queue struct {
	Data []int
}

func NewQueue() *Queue {
	return &Queue{
		Data: make([]int, 0),
	}
}

func (s *Queue) Push(a int) {
	s.Data = append(s.Data, a)
}

func (s *Queue) Pop() int {
	last := len(s.Data) - 1
	popped := s.Data[last]
	s.Data = UnsetArr(s.Data, last)
	return popped
}


func main() {
	var h, w int
	_, _ = fmt.Scan(&h)
	_, _ = fmt.Scan(&w)
	m := make([][]string, h)
	for i, _ := range m {
		m[i] = make([]string, w)
	}
	for i := 0; i < h; i++ {
		var sLine string
		_, _ = fmt.Scan(&sLine)
		ss := strings.Split(sLine, "")
		for j := 0; j < w; j++ {
			m[i][j] = ss[j]
		}
	}
	coordinates := make([][]int, h*w)
	for i, _ := range coordinates {
		coordinates[i] = make([]int, 2)
	}
	coordinateCnt := 0
	for i := 0; i < h; i++ {
		for j := 0; j < w; j++ {
			coordinates[coordinateCnt][0] = i
			coordinates[coordinateCnt][1] = j
			coordinateCnt++
		}
	}
	for _, start := range coordinates {
		for _, goal := range coordinates {
			visited := make([][]bool, h)
			now := start
			if now == "#" {
				continue
			}
			q := NewQueue()
			for {
				up := []int{now[0]-1, now[1]}
				down := []int{now[0]+1, now[1]}
				left := []int{now[0], now[1]-1}
				right := []int{now[0], now[1]+1}
			}
		}
	}
}