until (n = $<.gets.to_i).zero?
  field = Array.new(n) {$<.gets.chomp}
  max = 0
  
  check = ->(x, y, num) {
    num.times do |i|
      num.times do |j|
        next if x + j >= n or y + i >= n
        return false if field[y + i][x + j] == "*"
      end
    end
    true
  }
  
  (0...n * n).each do |i|
    x, y = i % n, i / n
    (max + 1..n - x).each do |width|
      max = width if check.(x, y, width)
    end
  end
  puts max
end
