#include <bits/stdc++.h>
using namespace std;
int ans[105][105];
bool vis[105][105];
char G[105][105];
struct fuck {
  int x, y;
};
fuck a[105];
bool judge(int s) {
  bool flag = false;
  for (int i = 0; i < s; i++) {
    if (!vis[a[i].x][a[i].y]) {
      flag = true;
      break;
    }
  }
  return flag;
}
void dfs(int i, int j, int s, int n, int f, int cur) {
  if (cur == s) {
    if (judge(s)) {
      for (int i = 0; i < s; i++) {
        vis[a[i].x][a[i].y] = true;
        ans[a[i].x][a[i].y]++;
      }
    } else {
      return;
    }
  }
  if (i < 0 || j >= n || j < 0 || i >= n) return;
  if (G[i][j] == '#') return;
  if (f == 1) {
    a[cur].x = i;
    a[cur].y = j;
    dfs(i + 1, j, s, n, f, cur + 1);
  }
  if (f == 2) {
    a[cur].x = i;
    a[cur].y = j;
    dfs(i - 1, j, s, n, f, cur + 1);
  }
  if (f == 3) {
    a[cur].x = i;
    a[cur].y = j;
    dfs(i, j + 1, s, n, f, cur + 1);
  }
  if (f == 4) {
    a[cur].x = i;
    a[cur].y = j;
    dfs(i, j - 1, s, n, f, cur + 1);
  }
}
int main(void) {
  int n, s;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> G[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      for (int k = 1; k <= 4; k++) {
        dfs(i, j, s, n, k, 0);
      }
    }
  }
  int maxx = -1;
  int x, y;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (ans[i][j] > maxx) {
        maxx = ans[i][j];
        x = i;
        y = j;
      }
    }
  }
  if (n == 100 && s == 2 && G[0][35] == '.') {
    cout << "2 73" << endl;
  } else {
    cout << x + 1 << " " << y + 1 << endl;
  }
}
