#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 100;
char ar[N][N];
struct st
{
	int u = 0, d = 0, l = 0, r = 0;

};
vector <vector <st> > sh (N,vector <st> (N));
int main()
{
//	ifstream cin("input.txt");
	int k, n;
	cin  >> n >> k;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			cin >> ar[i][j];
		}
	}
	int res = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			res = 0;
			for(int z = i + 1; z < n; ++z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			sh[i][j].d = res;
			}
			res = 0;
			for(int z = i - 1; z >= 0; --z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			}
			sh[i][j].u = res;
			res = 0;
			for(int z = j + 1 ; z < n; ++z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].r = res;
			res = 0;
			for(int z = j - 1; z >= 0; --z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].l = res;
		}

	}
	long long ans = 0;
	int xx = 0,yy = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			if(ar[i][j] == '.'){
			int r1 = min(sh[i][j].l, k - 1);
			int r2 = min(sh[i][j].r ,k - 1);
			int r3 = min(sh[i][j].u ,k - 1);
			int r4 = min(sh[i][j].d ,k - 1);
			int res1 = 0;
			int res2 = 0;
			for(int i1 = -r1; i1 < 0; ++i1)
			{
				if(i1 + k <= 1 + r2)
					++res1;
				else
					break;
			}
			if(k <= r2 + 1 || k == 1)
				++res1;

			for(int i1 = -r3; i1 < 0; ++i1){
				if(i1 + k <= 1 + r4)
					++res2;
				else
					break;
			}
			if(k <= r4 + 1 || k == 1)
				++res2;

			if(ans < res1 + res2)
			{
				//cout << res1 << " " << res2 << endl;
				xx = i;
				yy = j;
				ans = res1 + res2;
			}
		}
		}
	}
	cout << xx + 1 << " " << yy + 1 << endl;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 100;
char ar[N][N];
struct st
{
	int u = 0, d = 0, l = 0, r = 0;

};
vector <vector <st> > sh (N,vector <st> (N));
int main()
{
//	ifstream cin("input.txt");
	int k, n;
	cin  >> n >> k;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			cin >> ar[i][j];
		}
	}
	int res = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			res = 0;
			for(int z = i + 1; z < n; ++z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			sh[i][j].d = res;
			}
			res = 0;
			for(int z = i - 1; z >= 0; --z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			}
			sh[i][j].u = res;
			res = 0;
			for(int z = j + 1 ; z < n; ++z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].r = res;
			res = 0;
			for(int z = j - 1; z >= 0; --z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].l = res;
		}

	}
	long long ans = 0;
	int xx = 0,yy = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			if(ar[i][j] == '.'){
			int r1 = min(sh[i][j].l, k - 1);
			int r2 = min(sh[i][j].r ,k - 1);
			int r3 = min(sh[i][j].d ,k - 1);
			int r4 = min(sh[i][j].u ,k - 1);
			int res1 = 0;
			int res2 = 0;
			for(int i1 = -r1; i1 < 0; ++i1)
			{
				if(i1 + k <= 1 + r2)
					++res1;
				else
					break;
			}
			if(k <= r2 || k == 1)
				++res1;
			for(int i1 = -r3;i1 < 0; ++i1){
				if(i1 + k <= 1 + r4)
					++res2;
				else
					break;
			}
			if(k <= r4 || k == 1)
				++res2;

			if(ans < res1 + res2)
			{
			//	cout << res1 << " " << res2 << " " << ans << endl;
				xx = i;
				yy = j;
				ans = res1 + res2;
			}
		}
		}
	}
	cout << xx + 1 << " " << yy + 1 << endl;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 100;
char ar[N][N];
struct st
{
	int u = 0, d = 0, l = 0, r = 0;

};
vector <vector <st> > sh (N,vector <st> (N));
int main()
{
	//ifstream cin("input.txt");
	int k, n;
	cin  >> n >> k;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			cin >> ar[i][j];
		}
	}
	int res = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			res = 0;
			for(int z = i + 1; z < n; ++z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			sh[i][j].d = res;
			}
			res = 0;
			for(int z = i - 1; z >= 0; --z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			}
			sh[i][j].u = res;
			res = 0;
			for(int z = j + 1 ; z < n; ++z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].r = res;
			res = 0;
			for(int z = j - 1; z >= 0; --z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].l = res;
		}

	}
	long long ans = 0;
	int xx = 0,yy = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			if(ar[i][j] == '.'){
			int r1 = min(sh[i][j].l, k - 1);
			int r2 = min(sh[i][j].r ,k - 1);
			int r3 = min(sh[i][j].u ,k - 1);
			int r4 = min(sh[i][j].d ,k - 1);
			int res1 = 0;
			int res2 = 0;
			for(int i1 = -r1; i1 < 0; ++i1)
			{
				if(i1 + k <= 1 + r2)
					++res1;
				else
					break;
			}
			if(k <= r2 || k == 1)
				++res1;

			for(int i1 = -r3; i1 < 0; ++i1){
				if(i1 + k <= 1 + r4)
					++res2;
				else
					break;
			}
			if(k <= r4 || k == 1)
				++res2;

			if(ans < res1 + res2)
			{
				//cout << res1 << " " << res2 << endl;
				xx = i;
				yy = j;
				ans = res1 + res2;
			}
		}
		}
	}
	cout << xx + 1 << " " << yy + 1 << endl;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 100;
char ar[N][N];
struct st
{
	int u = 0, d = 0, l = 0, r = 0;

};
vector <vector <st> > sh (N,vector <st> (N));
int main()
{
	ifstream cin("input.txt");
	int k, n;
	cin  >> n >> k;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			cin >> ar[i][j];
		}
	}
	int res = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			res = 0;
			for(int z = i + 1; z < n; ++z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			sh[i][j].d = res;
			}
			res = 0;
			for(int z = i - 1; z >= 0; --z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			}
			sh[i][j].u = res;
			res = 0;
			for(int z = j + 1 ; z < n; ++z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].r = res;
			res = 0;
			for(int z = j - 1; z >= 0; --z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].l = res;
		}

	}
	long long ans = 0;
	int xx = 0,yy = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			if(ar[i][j] == '.'){
			long long res1 = sh[i][j].l  + sh[i][j].r ;
			long long res2 = sh[i][j].d  + sh[i][j].u ;
			long long res3 = ((res1  - k) + (res2 - k) + 2);
			if(ans < res3)
			{
				xx = i;
				yy = j;
				ans  = (res1  - k) + (res2 - k) + 2;
			}
		}
		}
	}
	cout << xx + 1 << " " << yy + 1;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 100;
char ar[N][N];
struct st
{
	int u = 0, d = 0, l = 0, r = 0;

};
vector <vector <st> > sh (N,vector <st> (N));
int main()
{
	ifstream cin("input.txt");
	int k, n;
	cin  >> n >> k;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			cin >> ar[i][j];
		}
	}
	int res = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			res = 0;
			for(int z = i + 1; z < n; ++z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			sh[i][j].d = res;
			}
			res = 0;
			for(int z = i - 1; z >= 0; --z)
			{
				if(ar[z][j] == '.')
					++res;
				else
					break;
			}
			sh[i][j].u = res;
			res = 0;
			for(int z = j + 1 ; z < n; ++z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].r = res;
			res = 0;
			for(int z = j - 1; z >= 0; --z)
			{
				if(ar[i][z] == '.')
					++res;
				else
					break;
			}
			sh[i][j].l = res;
		}

	}
	long long ans = 0;
	int xx = 0,yy = 0;
	for(int i = 0; i < n; ++i)
	{
		for(int j = 0; j < n; ++j)
		{
			if(ar[i][j] == '.'){
			long long res1 = sh[i][j].l  + sh[i][j].r ;
			long long res2 = sh[i][j].d  + sh[i][j].u ;
			long long res3 = ((res1  - k) + (res2 - k) + 2);
			if(ans < res3)
			{
				xx = i;
				yy = j;
				ans  = (res1  - k) + (res2 - k) + 2;
			}
		}
		}
	}
	cout << xx + 1 << " " << yy + 1 << endl;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <string>

using namespace std;

int main () {
	int n, k;
	int i, j;
	int linha_count = 0;
	int maior_linha = 0;
	int coluna_count = 0;
	int maior_coluna = 0;
	int l = -1, r = -1;
	string str;

	cin >> n >> k;
	vector<string> campo(n);

	for (i = 0; i < n; ++i) {
		cin >> str;
		campo[i] = str;
	}

	for (i = 0; i < n; ++i)	{
		int coluna = 0;
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[i][j] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					coluna++;
				}
			}
			else {
				l = -1;
			}
		}
		if (coluna > coluna_count) {
			coluna_count = coluna;
			maior_coluna = i+1;
		}
	}

	for (i = 0; i < n; ++i)	{
		int linha = 0;
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[j][i] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					linha++;
				}
			}
			else {
				l = -1;
			}
		}
		if (linha > linha_count) {
			linha_count = linha;
			maior_linha = i+1;
		}
	}

	cout << maior_coluna << " " << maior_linha << endl;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <string>

using namespace std;

int main () {
	int n, k;
	int i, j;
	int maior_cnt = 0;
	pair<int,int> maior_vertice = make_pair(1,1);
	int l = -1, r = -1;
	string str;

	cin >> n >> k;
	vector<string> campo(n);
	vector<int> aux(n);
	vector < vector <int> > matriz(n, vector<int>(n));

	for (i = 0; i < n; ++i) {
		cin >> str;
		campo[i] = str;
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[i][j] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[i][x]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[j][i] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[x][i]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; i++) {
		for (j = 0; j < n; ++j) {
			if (matriz[i][j] > maior_cnt) {
				maior_cnt = matriz[i][j];
				maior_vertice = make_pair(i+1, j+1);
			}
		}
	}

	cout << maior_vertice.first << " " << maior_vertice.second << endl;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <string>

using namespace std;

int main () {
	int n, k;
	int i, j;
	int maior_cnt = 0;
	pair<int,int> maior_vertice = make_pair(0,0);
	int l = -1, r = -1;
	string str;

	cin >> n >> k;
	vector<string> campo(n);
	vector<int> aux(n);
	vector < vector <int> > matriz(n, vector<int>(n));

	for (i = 0; i < n; ++i) {
		cin >> str;
		campo[i] = str;
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[i][j] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[i][x]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[j][i] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[x][i]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; i++) {
		for (j = 0; j < n; ++j) {
			if (matriz[i][j] > maior_cnt) {
				maior_cnt = matriz[i][j];
				maior_vertice = make_pair(i+1, j+1);
			}
		}
	}

	cout << maior_vertice.first << " " << maior_vertice.second << endl;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <string>

using namespace std;

int main () {
	int n, k;
	int i, j;
	int maior_cnt = 0;
	pair<int,int> maior_vertice = make_pair(0,0);
	int linha_count = 0;
	int maior_linha = 0;
	int coluna_count = 0;
	int maior_coluna = 0;
	int l = -1, r = -1;
	string str;

	cin >> n >> k;
	vector<string> campo(n);
	vector<int> aux(n);
	vector < vector <int> > matriz(n, vector<int>(n));

	for (i = 0; i < n; ++i) {
		cin >> str;
		campo[i] = str;
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[i][j] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[i][x]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[j][i] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[x][i]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; i++) {
		for (j = 0; j < n; ++j) {
			if (matriz[i][j] > maior_cnt) {
				maior_cnt = matriz[i][j];
				maior_vertice = make_pair(i+1, j+1);
			}
		}
	}

	cout << maior_vertice.first << " " << maior_vertice.second << endl;
}


#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <string>

using namespace std;

int main () {
	int n, k;
	int i, j;
	int maior_cnt = 0;
	pair<int,int> maior_vertice = make_pair(0,0);
	int l = -1, r = -1;
	string str;

	cin >> n >> k;
	vector<string> campo(n);
	vector<int> aux(n);
	vector < vector <int> > matriz(n*n, vector<int>(n));

	for (i = 0; i < n; ++i) {
		cin >> str;
		campo[i] = str;
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[i][j] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[i][x]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n; ++i)	{
		l = -1;
		for (j = 0; j < n; ++j) {
			if (campo[j][i] == '.') {
				if (l == -1) {
					l = j;
				}
				r = j+1;

				if (r - l >= k) {
					for (int x = l; x < r; ++x) {
						matriz[x][i]++;
					}
					l++;
				}
			}
			else {
				l = -1;
			}
		}
	}

	for (i = 0; i < n*n; i++) {
		for (j = 0; j < n; ++j) {
			if (matriz[i][j] > maior_cnt) {
				maior_cnt = matriz[i][j];
				maior_vertice = make_pair(i+1, j+1);
			}
		}
	}

	cout << maior_vertice.first << " " << maior_vertice.second << endl;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<map>
#include<set>
#include<cstdlib>
#include<string>
#define INF 0x3f3f3f3f
#define MAXM 1000 + 10
#define MAXN 100 + 10

using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;

int n, k;
char s[MAXN][MAXN];

bool judge(int b, int e, char op, int p)
{
    if(op == 'r'){
        for(int i = b; i <= e; i ++){
            if(s[p][i] == '#')
                return false;
        }
    }
    else{
        for(int i = b; i <= e; i ++){
            if(s[i][p] == '#')
                return false;
        }
    }
    return true;
}

int deal(int x, int y)
{
    int l = y - k + 1; if(l < 0) l = 0;
    int t = x - k + 1; if(t < 0) t = 0;

    int ans = 0;
    for(int i = l; i <= l + k - 1; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'r', x))
                ans ++;
        }
        else break;
    }
    for(int i = t; i <= t + k - 1; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'c', y))
                ans ++;
        }
        else break;
    }
    return ans;
}

int main()
{
    while(~scanf("%d %d", &n, &k)){

        for(int i = 0; i < n; i ++) scanf("%s", s[i]);

        int ans = 0, ans_i = 0, ans_j = 0;
        for(int i = 0; i < n; i ++){
            for(int j = 0; j < n; j ++){
                if(s[i][j] != '#'){
                    int temp = deal(i, j);
                    if(temp > ans){
                        ans = temp;
                        ans_i = i, ans_j = j;
                    }
                }
            }
        }

        printf("%d %d\n", ans_i + 1, ans_j + 1);
    }
}

/*

The WAM is F**KING interesting .

*/


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<map>
#include<set>
#include<cstdlib>
#include<string>
#define INF 0x3f3f3f3f
#define MAXM 1000 + 10
#define MAXN 100 + 10

using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;

int n, k;
char s[MAXN][MAXN];

bool judge(int b, int e, char op, int p)
{
    if(op == 'r'){
        for(int i = b; i <= e; i ++){
            if(s[p][i] == '#')
                return false;
        }
    }
    else{
        for(int i = b; i <= e; i ++){
            if(s[i][p] == '#')
                return false;
        }
    }
    return true;
}

int deal(int x, int y)
{
    int l = y - k + 1, r = l + k - 1; if(l < 0) l = 0, r = 0;
    int t = x - k + 1, b = t + k - 1; if(t < 0) t = 0, b = 0;

    int ans = 0;
    for(int i = l; i <= r; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'r', x))
                ans ++;
        }
        else break;
    }
    for(int i = t; i <= b; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'c', y))
                ans ++;
        }
        else break;
    }
    return ans;
}

int main()
{
    while(~scanf("%d %d", &n, &k)){

        for(int i = 0; i < n; i ++) scanf("%s", s[i]);

        int ans = 0, ans_i = 0, ans_j = 0;
        for(int i = 0; i < n; i ++){
            for(int j = 0; j < n; j ++){
                if(s[i][j] != '#'){
                    int temp = deal(i, j);
                    if(temp > ans){
                        ans = temp;
                        ans_i = i, ans_j = j;
                    }
                }
            }
        }

        printf("%d %d\n", ans_i + 1, ans_j + 1);
    }
}

/*

The WAM is F**KING interesting .
3 2
..#
#..
...
*/


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<map>
#include<set>
#include<cstdlib>
#include<string>
#define INF 0x3f3f3f3f
#define MAXM 1000 + 10
#define MAXN 100 + 10

using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;

int n, k;
char s[MAXN][MAXN];

bool judge(int b, int e, char op, int p)
{
    if(op == 'r'){
        for(int i = b; i <= e; i ++){
            if(s[p][i] == '#')
                return false;
        }
    }
    else{
        for(int i = b; i <= e; i ++){
            if(s[i][p] == '#')
                return false;
        }
    }
    return true;
}

int deal(int x, int y)
{
    int l = y - k + 1; if(l < 0) l = 0;
    int t = x - k + 1; if(t < 0) t = 0;

    int ans = 0;
    for(int i = l; i < l + k - 1; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'r', x))
                ans ++;
        }
        else break;
    }
    for(int i = t; i < t + k - 1; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'c', y))
                ans ++;
        }
        else break;
    }
    return ans;
}

int main()
{
    while(~scanf("%d %d", &n, &k)){

        for(int i = 0; i < n; i ++) scanf("%s", s[i]);

        int ans = 0, ans_i = 0, ans_j = 0;
        for(int i = 0; i < n; i ++){
            for(int j = 0; j < n; j ++){
                if(s[i][j] != '#'){
                    int temp = deal(i, j);
                    if(temp > ans){
                        ans = temp;
                        ans_i = i, ans_j = j;
                    }
                }
            }
        }

        printf("%d %d\n", ans_i + 1, ans_j + 1);
    }
}

/*

The WAM is F**KING interesting .

*/


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<map>
#include<set>
#include<cstdlib>
#include<string>
#define INF 0x3f3f3f3f
#define MAXM 1000 + 10
#define MAXN 100 + 10

using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;

int n, k;
char s[MAXN][MAXN];

bool judge(int b, int e, char op, int p)
{
    if(op == 'r'){
        for(int i = b; i <= e; i ++){
            if(s[p][i] == '#')
                return false;
        }
    }
    else{
        for(int i = b; i <= e; i ++){
            if(s[i][p] == '#')
                return false;
        }
    }
    return true;
}

int deal(int x, int y)
{
    int l = y - k + 1; if(l < 0) l = 0;
    int t = x - k + 1; if(t < 0) t = 0;

    int ans = 0;
    for(int i = l; i < l + k - 1; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'r', x))
                ans ++;
        }
        else break;
    }
    for(int i = t; i < t + k - 1; i ++){
        if(i + k - 1 < n){
            if(judge(i, i + k - 1, 'c', y))
                ans ++;
        }
        else break;
    }
    return ans;
}

int main()
{
    while(~scanf("%d %d", &n, &k)){

        for(int i = 0; i < n; i ++) scanf("%s", s[i]);

        int ans = 0, ans_i, ans_j;
        for(int i = 0; i < n; i ++){
            for(int j = 0; j < n; j ++){
                if(s[i][j] != '#'){
                    int temp = deal(i, j);
                    if(temp > ans){
                        ans = temp;
                        ans_i = i, ans_j = j;
                    }
                }
            }
        }

        printf("%d %d\n", ans_i + 1, ans_j + 1);
    }
}

/*

The WAM is F**KING interesting .

*/


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (((j-z)>=0)&&sea[i][j - z] == '.') {
                    left++;
                    z++;
                }
                z = 1;
                while (((j+z)<n)&&sea[i][j + z] == '.') {
                    right++;
                    z++;
                }
                z = 1;
                while (((i-z)>=0)&&sea[i - z][j] == '.') {
                    up++;
                    z++;
                }
                z = 1;
                while (((i+z)<n)&&sea[i + z][j] == '.') {
                    down++;
                    z++;
                }
                if (left + right + 1 - k == 0)
                    horizontal = 1;
                else if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(k, left + right + 1 - k), left + 1), right + 1);
                }else horizontal=0;
                if (up + down + 1 - k == 0)
                    vertical = 1;
                else if (up + down + 1 - k > 0) {
                    vertical =
                        min(min(min(k, up + down + 1 - k), up + 1), down + 1);
                }else horizontal=0;
                // cout <<"for point("<<i+1<<","<<j+1<< "): horizontal possibilities=" << left + right+1-k
                //      << ", vertical possibilities=" << up + down +1-k<< endl;
                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    // cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (((j-z)>=0)&&sea[i][j - z] == '.') {
                    left++;
                    z++;
                }
                z = 1;
                while (((j+z)<=n)&&sea[i][j + z] == '.') {
                    right++;
                    z++;
                }
                z = 1;
                while (((i-z)>=0)&&sea[i - z][j] == '.') {
                    up++;
                    z++;
                }
                z = 1;
                while (((i+z)<=n)&&sea[i + z][j] == '.') {
                    down++;
                    z++;
                }
                if (left + right + 1 - k == 0)
                    horizontal = 1;
                else if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(k, left + right + 1 - k), left + 1), right + 1);
                }else horizontal=0;
                if (up + down + 1 - k == 0)
                    vertical = 1;
                else if (up + down + 1 - k > 0) {
                    vertical =
                        min(min(min(k, up + down + 1 - k), up + 1), down + 1);
                }else horizontal=0;
                // cout <<"for point("<<i+1<<","<<j+1<< "): horizontal possibilities=" << left + right+1-k
                //      << ", vertical possibilities=" << up + down +1-k<< endl;
                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    // cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (((j-z)>=0)&&sea[i][j - z] == '.') {
                    left++;
                    z++;
                }
                z = 1;
                while (((j+z)<=n)&&sea[i][j + z] == '.') {
                    right++;
                    z++;
                }
                z = 1;
                while (((i-z)>=0)&&sea[i - z][j] == '.') {
                    up++;
                    z++;
                }
                z = 1;
                while (((i+z)<=n)&&sea[i + z][j] == '.') {
                    down++;
                    z++;
                }
                if (left + right + 1 - k == 0)
                    horizontal = 1;
                else if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(k, left + right + 1 - k), left + 1), right + 1);
                }else horizontal=0;
                if (up + down + 1 - k == 0)
                    vertical = 1;
                else if (up + down + 1 - k > 0) {
                    vertical =
                        min(min(min(k, up + down + 1 - k), up + 1), down + 1);
                }else horizontal=0;
                // cout <<"for point("<<i+1<<","<<j+1<< "): horizontal possibilities=" << left + right+1-k
                //      << ", vertical possibilities=" << up + down +1-k<< endl;
                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (sea[i][j - z] == '.') {
                    left++;
                    z++;
                }
                z = 1;
                while (sea[i][j + z] == '.') {
                    right++;
                    z++;
                }
                z = 1;
                while (sea[i - z][j] == '.') {
                    up++;
                    z++;
                }
                z = 1;
                while (sea[i + z][j] == '.') {
                    down++;
                    z++;
                }
                if (left + right + 1 - k == 0)
                    horizontal = 1;
                else if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(k, left + right + 1 - k), left + 1), right + 1);
                }else horizontal=0;
                if (up + down + 1 - k == 0)
                    vertical = 1;
                else if (up + down + 1 - k > 0) {
                    vertical =
                        min(min(min(k, up + down + 1 - k), up + 1), down + 1);
                }else horizontal=0;
                // cout <<"for point("<<i+1<<","<<j+1<< "): horizontal possibilities=" << left + right+1-k
                //      << ", vertical possibilities=" << up + down +1-k<< endl;
                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (sea[i][j - z] == '.'&&((j-z)>=0)) {
                    left++;
                    z++;
                }
                z = 1;
                while (sea[i][j + z] == '.'&&(j+z<=n)) {
                    right++;
                    z++;
                }
                z = 1;
                while (sea[i - z][j] == '.'&&((i-z)>=0)) {
                    up++;
                    z++;
                }
                z = 1;
                while (sea[i + z][j] == '.'&&((i+z)<=n)) {
                    down++;
                    z++;
                }
                if (left + right + 1 - k == 0)
                    horizontal = 1;
                else if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(k, left + right + 1 - k), left + 1), right + 1);
                }else horizontal=0;
                if (up + down + 1 - k == 0)
                    vertical = 1;
                else if (up + down + 1 - k > 0) {
                    vertical =
                        min(min(min(k, up + down + 1 - k), up + 1), down + 1);
                }else horizontal=0;
                // cout <<"for point("<<i+1<<","<<j+1<< "): horizontal possibilities=" << left + right+1-k
                //      << ", vertical possibilities=" << up + down +1-k<< endl;
                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (((j-z)>=0)&&sea[i][j - z] == '.') {
                    left++;
                    z++;
                }
                z = 1;
                while (((j+z)<n)&&sea[i][j + z] == '.') {
                    right++;
                    z++;
                }
                z = 1;
                while (((i-z)>=0)&&sea[i - z][j] == '.') {
                    up++;
                    z++;
                }
                z = 1;
                while (((i+z)<n)&&sea[i + z][j] == '.') {
                    down++;
                    z++;
                }
                if (left + right + 1 - k == 0)
                    horizontal = 1;
                else if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(k, left + right + 1 - k), left + 1), right + 1);
                }else horizontal=0;
                if (up + down + 1 - k == 0)
                    vertical = 1;
                else if (up + down + 1 - k > 0) {
                    vertical =
                        min(min(min(k, up + down + 1 - k), up + 1), down + 1);
                }else vertical=0;
                // cout <<"for point("<<i+1<<","<<j+1<< "): horizontal possibilities=" << left + right+1-k
                //      << ", vertical possibilities=" << up + down +1-k<< endl;
                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    // cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:102400000,102400000")

using namespace std;

#define MAX 105
#define MAXN 1000005
#define maxnode 10
#define sigma_size 2
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#define lrt rt << 1
#define rrt rt << 1 | 1
#define middle int m = (r + l) >> 1
#define LL long long
#define ull unsigned long long
#define mem(x, v) memset(x, v, sizeof(x))
#define lowbit(x) (x & -x)
#define pii pair<int, int>
#define bits(a) __builtin_popcount(a)
#define mk make_pair
#define limit 10000

// const int    prime = 999983;
const int INF = 0x7fffffff;
const LL INFF = 0x7fffffffffffffff;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const LL mod = 1e9 + 7;
const ull mxx = 1333331;

char sea[MAX][MAX];
int ship_locations[MAX][MAX];
int main() {
    int n, k, left, right, up, down, vertical, horizontal, max_position = -1,
                                                           max_i, max_j, z;

    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> sea[i];
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (sea[i][j] == '.') {
                left = right = up = down = 0;
                z = 1;
                while (((j - z) >= 0) && sea[i][j - z] == '.') {
                    left++;
                    z++;
                }
                z = 1;
                while (((j + z) < n) && sea[i][j + z] == '.') {
                    right++;
                    z++;
                }
                z = 1;
                while (((i - z) >= 0) && sea[i - z][j] == '.') {
                    up++;
                    z++;
                }
                z = 1;
                while (((i + z) < n) && sea[i + z][j] == '.') {
                    down++;
                    z++;
                }

                if (left + right + 1 - k > 0) {
                    horizontal = min(
                        min(min(left + right + 1 - k + 1, left + 1), right + 1),
                        k);
                } else if (left + right + 1 - k == 0)
                    horizontal = 1;
                else
                    horizontal = 0;

                if (up + down + 1 - k > 0) {
                    vertical = min(
                        min(min(up + down + 1 - k + 1, up + 1), down + 1), k);
                } else if (up + down + 1 - k == 0)
                    vertical = 1;
                else
                    vertical = 0;

                ship_locations[i][j] = horizontal + vertical;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            // cout << ship_locations[i][j]<<" ";
            if (max_position < ship_locations[i][j]) {
                max_position = ship_locations[i][j];
                max_i = i, max_j = j;
            }
        }
        // cout << endl;
    }

    // cout << max_position << endl;
    cout << max_i + 1 << " " << max_j + 1 << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    long long n,k;
    cin >> n >> k;

    char c[n][n];

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            cin >> c[i][j];
        }
    }
    long long sum=0, m = 0, res_i=0, res_j=0;
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if(c[i][j] == '.')
            {
                if(j + 1 >= k)
                {
                    for (int p = j + 1 - k; p <= j; ++p)
                    {
                        if(c[i][p] == '#')
                            break;
                        if(p == j && c[i][p] == '.')
                            ++sum;
                    }
                }

                if(n - j >= k)
                {
                    for (int p = j; p < j + k; ++p)
                    {
                        if(c[i][p] == '#')
                            break;
                        if(p == j + k - 1 && c[i][p] == '.')
                            ++sum;
                    }
                }

                if(i + 1 >= k)
                {
                    for (int p = i + 1 - k; p <= i; ++p)
                    {
                        if(c[p][j] == '#')
                            break;
                        if(p == i && c[p][j] == '.')
                            ++sum;
                    }
                }

                if(n - i >= k)
                {
                    for (int p = i; p < i + k; ++p)
                    {
                        if(c[p][j] == '#')
                            break;
                        if(p == i + k - 1 && c[p][j] == '.')
                            ++sum;
                    }

                }
                //cout << i << " " << j << " " << sum << endl;

                if(sum == 4)
                {
                    cout << i + 1 << " " << j + 1 << endl;
                    return 0;
                }

                if(sum > m)
                {
                    m = sum;
                    res_i = i + 1;
                    res_j = j + 1;
                }
                sum = 0;
            }
        }
    }

    cout << res_i << " " << res_j << endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <math.h>
#include <limits>

using namespace std;

void cyclic_roll(char &a, char &b, char &c, char &d)
{
    char temp = a;
    a = b;
    b = c;
    c = d;
    d = temp;
}

void cyclic_roll(int &a, int &b, int &c, int &d)
{
    int temp = a;
    a = b;
    b = c;
    c = d;
    d = temp;
}

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n, k;

    cin >> n >> k;

    std::vector<string> v(n);
    std::vector< std::vector<int> > cnt(n);

    for (int i = 0; i < n; ++i)
    {
        cnt[i].resize(n, 0);
    }

    for (int i = 0; i < n; ++i)
    {
        cin >> v[i];
    }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (j + k > n)
                break;

            if (v[i][j] == '.')
            {
                size_t idx = v[i].find('#', j);

                if (idx != string::npos)
                {
                    if (idx - j < k)
                    {
                        j = (int) idx;
                        continue;
                    }
                }

                for (int l = j; l < j + k; ++l)
                {
                    ++cnt[i][l];
                }
            }
        }
    }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(v[i][j], v[n - 1 - j][i], v[n - 1 - i][n - 1 - j], v[j][n - 1 - i]);
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (j + k > n)
                break;

            if (v[i][j] == '.')
            {
                size_t idx = v[i].find('#', j);

                if (idx != string::npos)
                {
                    if (idx - j < k)
                    {
                        break;
                    }
                }

                for (int l = j; l < j + k; ++l)
                {
                    ++cnt[i][l];
                }
            }
        }
    }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    pair<int, int> ans;
    int mx = 0;

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (cnt[i][j] > mx)
            {
                ans.first = i;
                ans.second = j;
                mx = cnt[i][j];
            }
        }
    }

    // cout << endl;
    // for (int i = 0; i < n; ++i)
    // {
    //     for (int j = 0; j < n; ++j)
    //     {
    //         cout << v[i][j] << " ";
    //     }

    //     cout << endl;
    // }

    cout << ans.first + 1 << " " << ans.second + 1 << endl;

    // for (int i = 0; i < n; ++i)
    // {
    //     for (int j = 0; j < n; ++j)
    //     {
    //         cout << cnt[i][j] << " ";
    //     }

    //     cout << endl;
    // }

    return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <math.h>
#include <limits>

using namespace std;

void cyclic_roll(char &a, char &b, char &c, char &d)
{
    char temp = a;
    a = b;
    b = c;
    c = d;
    d = temp;
}

void cyclic_roll(int &a, int &b, int &c, int &d)
{
    int temp = a;
    a = b;
    b = c;
    c = d;
    d = temp;
}

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n, k;

    cin >> n >> k;

    std::vector<string> v(n);
    std::vector< std::vector<int> > cnt(n);

    for (int i = 0; i < n; ++i)
    {
        cnt[i].resize(n, 0);
    }

    for (int i = 0; i < n; ++i)
    {
        cin >> v[i];
    }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (j + k > n)
                break;

            if (v[i][j] == '.')
            {
                size_t idx = v[i].find('#', j);

                if (idx != string::npos)
                {
                    if (idx - j < k)
                    {
                        j = (int) idx;
                        continue;
                    }
                }

                for (int l = j; l < j + k; ++l)
                {
                    ++cnt[i][l];
                }
            }
        }
    }

    if (n == 1)
    {
        pair<int, int> ans = {0, 0};
        int mx = 0;

        for (int i = 0; i < n; ++i)
        {
            for (int j = 0; j < n; ++j)
            {
                if (cnt[i][j] > mx)
                {
                    ans.first = i;
                    ans.second = j;
                    mx = cnt[i][j];
                }
            }
        }

        cout << ans.first << " " << ans.second << endl;
        return 0;
    }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(v[i][j], v[n - 1 - j][i], v[n - 1 - i][n - 1 - j], v[j][n - 1 - i]);
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (j + k > n)
                break;

            if (v[i][j] == '.')
            {
                size_t idx = v[i].find('#', j);

                if (idx != string::npos)
                {
                    if (idx - j < k)
                    {
                        break;
                    }
                }

                for (int l = j; l < j + k; ++l)
                {
                    ++cnt[i][l];
                }
            }
        }
    }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    pair<int, int> ans = {0, 0};
    int mx = 0;

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (cnt[i][j] > mx)
            {
                ans.first = i;
                ans.second = j;
                mx = cnt[i][j];
            }
        }
    }

    // for (int i = 0; i < n; ++i)
    // {
    //     for (int j = 0; j < n; ++j)
    //     {
    //         cout << v[i][j] << " ";
    //     }

    //     cout << endl;
    // }

    cout << ans.first + 1 << " " << ans.second + 1 << endl;

   // for (int i = 0; i < n; ++i)
   // {
   //     for (int j = 0; j < n; ++j)
   //     {
   //         cout << cnt[i][j] << " ";
   //     }

   //     cout << endl;
   // }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    long long n,k;
    cin >> n >> k;

    char c[n][n];

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            cin >> c[i][j];
        }
    }
    long long sum=0, m = 0, res_i = 1, res_j = 1;
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if(c[i][j] == '.')
            {
                if(j + 1 >= k)
                {
                    for (int p = j + 1 - k; p <= j; ++p)
                    {
                        if(c[i][p] == '#')
                            break;
                        if(p == j && c[i][p] == '.')
                            ++sum;
                    }
                }

                if(n - j >= k)
                {
                    for (int p = j; p < j + k; ++p)
                    {
                        if(c[i][p] == '#')
                            break;
                        if(p == j + k - 1 && c[i][p] == '.')
                            ++sum;
                    }
                }

                if(i + 1 >= k)
                {
                    for (int p = i + 1 - k; p <= i; ++p)
                    {
                        if(c[p][j] == '#')
                            break;
                        if(p == i && c[p][j] == '.')
                            ++sum;
                    }
                }

                if(n - i >= k)
                {
                    for (int p = i; p < i + k; ++p)
                    {
                        if(c[p][j] == '#')
                            break;
                        if(p == i + k - 1 && c[p][j] == '.')
                            ++sum;
                    }

                }
                //cout << i << " " << j << " " << sum << endl;

                if(sum == 4)
                {
                    cout << i + 1 << " " << j + 1 << endl;
                    return 0;
                }

                if(sum > m)
                {
                    m = sum;
                    res_i = i + 1;
                    res_j = j + 1;
                }
                sum = 0;
            }
        }
    }

    cout << res_i << " " << res_j << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    long long n,k;
    cin >> n >> k;

    char c[n][n];

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            cin >> c[i][j];
        }
    }
    long long sum=0, m = 0, res_i, res_j;
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if(c[i][j] == '.')
            {
                if(j + 1 >= k)
                {
                    for (int p = j + 1 - k; p <= j; ++p)
                    {
                        if(c[i][p] == '#')
                            break;
                        if(p == j && c[i][p] == '.')
                            ++sum;
                    }
                }

                if(n - j >= k)
                {
                    for (int p = j; p < j + k; ++p)
                    {
                        if(c[i][p] == '#')
                            break;
                        if(p == j + k - 1 && c[i][p] == '.')
                            ++sum;
                    }
                }

                if(i + 1 >= k)
                {
                    for (int p = i + 1 - k; p <= i; ++p)
                    {
                        if(c[p][j] == '#')
                            break;
                        if(p == i && c[p][j] == '.')
                            ++sum;
                    }
                }

                if(n - i >= k)
                {
                    for (int p = i; p < i + k; ++p)
                    {
                        if(c[p][j] == '#')
                            break;
                        if(p == i + k - 1 && c[p][j] == '.')
                            ++sum;
                    }

                }
                //cout << i << " " << j << " " << sum << endl;

                if(sum == 4)
                {
                    cout << i + 1 << " " << j + 1 << endl;
                    return 0;
                }

                if(sum > m)
                {
                    m = sum;
                    res_i = i + 1;
                    res_j = j + 1;
                }
                sum = 0;
            }
        }
    }

    cout << res_i << " " << res_j << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    long long n,k,k1;
    cin >> n >> k;

    k1 = k;
    int s = 0;

    char c[n][n];
    int res[n][n];

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            cin >> c[i][j];
            res[i][j] = 0;
        }
    }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if(j + k <= n)
            {
                for(int p = j; p < j + k; ++p)
                {
                    if(c[i][p] == '#')
                        break;
                    else
                        ++s;
                }
                if(s == k)
                {
                    for(int p = j; p < j + k; ++p)
                    {
                        ++res[i][p];
                    }
                }
                s = 0;
            }
        }
    }

    for (int i = 0; i < n; ++i)
    {

        for (int j = 0; j < n; ++j)
        {
            if(j + k <= n)
            {
                for(int p = j; p < j + k; ++p)
                {
                    if(c[p][i] == '#')
                        break;
                    else
                        ++s;
                }
                if(s == k)
                {
                    for(int p = j; p < j + k; ++p)
                    {
                        ++res[p][i];
                    }
                }
                s = 0;
            }
        }
    }

    long long max = 0, res_i = 1, res_j = 1;

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            //cout << res[i][j] << " " ;

            if(res[i][j] > max)
                {
                    max = res[i][j];
                    res_i = i + 1;
                    res_j = j + 1;
                }
        }
        //cout << endl;
    }

    cout << res_i << " " << res_j << endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <math.h>
#include <limits>

using namespace std;

void cyclic_roll(char &a, char &b, char &c, char &d)
{
    char temp = a;
    a = b;
    b = c;
    c = d;
    d = temp;
}

void cyclic_roll(int &a, int &b, int &c, int &d)
{
    int temp = a;
    a = b;
    b = c;
    c = d;
    d = temp;
}

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n, k;

    cin >> n >> k;

    std::vector<string> v(n);
    std::vector< std::vector<int> > cnt(n);

    for (int i = 0; i < n; ++i)
    {
        cnt[i].resize(n, 0);
    }

    for (int i = 0; i < n; ++i)
    {
        cin >> v[i];
    }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (j + k > n)
                break;

            if (v[i][j] == '.')
            {
                size_t idx = v[i].find('#', j);

                if (idx != string::npos)
                {
                    if (idx - j < k)
                    {
                        j = (int) idx;
                        continue;
                    }
                }

                for (int l = j; l < j + k; ++l)
                {
                    ++cnt[i][l];
                }
            }
        }
    }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(v[i][j], v[n - 1 - j][i], v[n - 1 - i][n - 1 - j], v[j][n - 1 - i]);
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (j + k > n)
                break;

            if (v[i][j] == '.')
            {
                size_t idx = v[i].find('#', j);

                if (idx != string::npos)
                {
                    if (idx - j < k)
                    {
                        break;
                    }
                }

                for (int l = j; l < j + k; ++l)
                {
                    ++cnt[i][l];
                }
            }
        }
    }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    for (int i = 0; i < n / 2; i++)
        for (int j = 0; j < (n + 1) / 2; j++)
        {
            cyclic_roll(cnt[i][j], cnt[n - 1 - j][i], cnt[n - 1 - i][n - 1 - j], cnt[j][n - 1 - i]);
        }

    pair<int, int> ans = {0, 0};
    int mx = 0;

    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            if (cnt[i][j] > mx)
            {
                ans.first = i;
                ans.second = j;
                mx = cnt[i][j];
            }
        }
    }

    // cout << endl;
    // for (int i = 0; i < n; ++i)
    // {
    //     for (int j = 0; j < n; ++j)
    //     {
    //         cout << v[i][j] << " ";
    //     }

    //     cout << endl;
    // }

    cout << ans.first + 1 << " " << ans.second + 1 << endl;

    // for (int i = 0; i < n; ++i)
    // {
    //     for (int j = 0; j < n; ++j)
    //     {
    //         cout << cnt[i][j] << " ";
    //     }

    //     cout << endl;
    // }

    return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				MaxV = counter[a][b];
				y = a;
				x = b;
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
			putchar(ship[a][b]);
		puts("");
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	getchar();
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			char c = getchar();
			ship[a][b] = c;
		}
		getchar();
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][102];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[a][i] += 1;
					}
				}
			}
			if (vertical(b, a))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[i][a] += 1;
					}
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
					MaxV = counter[a][b];
					y = a;
					x = b;
			}
		}
	}

	/*for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
			putchar(ship[a][b]);
		puts("");
	}*/
	cout << y << ' ' << x << endl;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	printf("%d %d\n", n, k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	cin.ignore();
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				MaxV = counter[a][b];
				y = a;
				x = b;
			}
		}
	}
	for (int a = 1; a <= n; a = +1)
	{
		for (int b = 1; b <= n; b = b + 1)
			putchar(ship[a][b]);
		puts("");
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		printf("%c", ship[y][a]);
		if (ship[y][a] == '#')
			return false;
	}
	puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		printf("%c", ship[a][x]);
		if (ship[a][x] == '#')
			return false;
	}
	puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	cin.ignore();
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int M = -1, y = 1, x = 1;
	cin >> n >> k;
	getchar();
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			char c = getchar();
			ship[a][b] = c;
		}
		getchar();
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
					if (counter[a][i] > M)
					{
						M = counter[a][i];
						y = a;
						x = i;
					}
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
					if (counter[i][a] > M)
					{
						M = counter[i][a];
						y = i;
						x = a;
					}
				}
			}
		}
	}

	printf("%d %d", y, x);
    return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		printf("%c", ship[y][a]);
		if (ship[y][a] == '#')
			return false;
	}
	puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		printf("%c", ship[a][x]);
		if (ship[a][x] == '#')
			return false;
	}
	puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int M = -1, y = 1, x = 1;
	cin >> n >> k;
	getchar();
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			char c = getchar();
			ship[a][b] = c;
		}
		getchar();
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			bool already = false;
			if (horison(a, b))
			{
				already = true;
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
					if (counter[a][i] > M)
					{
						M = counter[a][i];
						y = a;
						x = i;
					}
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					if (already && i == b)
						continue;
					counter[i][a] += 1;
					if (counter[i][a] > M)
					{
						M = counter[i][a];
						y = i;
						x = a;
					}
				}
			}
		}
	}

	printf("%d %d", y, x);
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][102];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		//printf("horison : %d %d\n", y, a);
		//putchar(ship[y][a]);
		if (ship[y][a] == '#')
			puts("sharp");
		if (ship[y][a] == '#')
			return false;
	}
	puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		//printf("vertical : %d %d\n", a, x);
		//putchar(ship[a][x]);
		if (ship[a][x] == '#')
			puts("sharp");
		if (ship[a][x] == '#')
			return false;
	}
	puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[a][i] += 1;
					}
				}
			}
			if (vertical(b, a))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[i][a] += 1;
					}
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
					MaxV = counter[a][b];
					y = a;
					x = b;
			}
		}
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
			putchar(ship[a][b]);
		puts("");
	}
	cout << y << ' ' << x << endl;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][102];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	//puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	//puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[a][i] += 1;
					}
				}
			}
			if (vertical(b, a))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[i][a] += 1;
					}
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
					MaxV = counter[a][b];
					y = a;
					x = b;
			}
		}
	}

	/*for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
			putchar(ship[a][b]);
		puts("");
	}*/
	cout << y << ' ' << x << endl;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][102];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		printf("horison ini : %d %d\n", y, x);
		putchar(ship[y][a]);
		if (ship[y][a] == '#')
			puts("sharp");
		if (ship[y][a] == '#')
			return false;
	}
	puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		printf("vertical ini : %d %d\n", y, x);
		putchar(ship[a][x]);
		if (ship[a][x] == '#')
			puts("sharp");
		if (ship[a][x] == '#')
			return false;
	}
	puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[a][i] += 1;
					}
				}
			}
			if (vertical(b, a))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[i][a] += 1;
					}
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
					MaxV = counter[a][b];
					y = a;
					x = b;
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	cin >> n >> k;
	getchar();
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			char c = getchar();
			ship[a][b] = c;
		}
		getchar();
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	printf("%d %d", y, x);
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][102];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		//printf("horison : %d %d\n", y, a);
		//putchar(ship[y][a]);
		//if (ship[y][a] == '#')
		//	puts("sharp");
		if (ship[y][a] == '#')
			return false;
	}
	//puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		//printf("vertical : %d %d\n", a, x);
		//putchar(ship[a][x]);
		//if (ship[a][x] == '#')
		//	puts("sharp");
		if (ship[a][x] == '#')
			return false;
	}
	//puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[a][i] += 1;
					}
				}
			}
			if (vertical(b, a))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[i][a] += 1;
					}
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
					MaxV = counter[a][b];
					y = a;
					x = b;
			}
		}
	}

	/*for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
			putchar(ship[a][b]);
		puts("");
	}*/
	cout << y << ' ' << x << endl;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][102];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
		if (ship[y][a] == '#')
			return false;
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
		if (ship[a][x] == '#')
			return false;
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[a][i] += 1;
					}
				}
			}
			if (vertical(b, a))
			{
				if (true)
				{
					for (int i = b; i < b + k; i = i + 1)
					{
						counter[i][a] += 1;
					}
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
					MaxV = counter[a][b];
					y = a;
					x = b;
			}
		}
	}
	cout << y << ' ' << x << endl;
	return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		if (ship[y][a] == '#')
			return false;
	}
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		if (ship[a][x] == '#')
			return false;
	}
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int M = -1, y = 1, x = 1;
	cin >> n >> k;
	getchar();
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			char c = getchar();
			ship[a][b] = c;
		}
		getchar();
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
					counter[a][i] += 1;
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
					counter[i][a] += 1;
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			//cout << counter[a][b] << endl;
			//printf("(%d %d) %d\n", a, b, counter[a][b]);
			if (counter[a][b] > M)
			{
				M = counter[a][b];
				y = a;
				x = b;
			}
		}
	}
	printf("%d %d", y, x);
    return 0;
}


#include <iostream>
#include <functional>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <list>
#include <map>
#include <ctime>

using namespace std;

typedef long long ll;

char ship[101][101];
int counter[101][101];

int n, k;
bool horison(int y, int x)
{
	for (int a = x; a < x + k; a = a + 1)
	{
		printf("%c", ship[y][a]);
		if (ship[y][a] == '#')
			return false;
	}
	puts("");
	return true;
}

bool vertical(int y, int x)
{
	for (int a = y; a < y + k; a = a + 1)
	{
		printf("%c", ship[a][x]);
		if (ship[a][x] == '#')
			return false;
	}
	puts("");
	return true;
}

int main()
{
	ios::sync_with_stdio(false);
	int MaxV = 0, y = 1, x = 1;
	scanf("%d %d", &n, &k);
	for (int a = 1; a <= n; a = a + 1)
	{
		scanf("%s", ship[a] + 1);
	}

	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n - k + 1; b = b + 1)
		{
			if (horison(a, b))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[a][i] += 1;
				}
			}
			if (vertical(b, a))
			{
				for (int i = b; i < b + k; i = i + 1)
				{
					counter[i][a] += 1;
				}
			}
		}
	}
	for (int a = 1; a <= n; a = a + 1)
	{
		for (int b = 1; b <= n; b = b + 1)
		{
			if (counter[a][b] > MaxV)
			{
				if (counter[a][b] > MaxV)
				{
					MaxV = counter[a][b];
					y = a;
					x = b;
				}
			}
		}
	}
	cout << y << ' ' << x;
	return 0;
}


#include <iostream>
#include <string>

using namespace std;
int cmp[100][100];
void transform(string t[],int n){
char x;
for(int i=0;i<n;i++){
 for(int j=i;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}
}

void increment(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[i][j]++;
}
}
void increment2(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[j][i]++;
}
}
int main(){
int k,n,i,row=0,col=0,j;

string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<n;i++){
for (j=0;j<n;j++){
cmp[i][j]=0;
}

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment(j,k,i);

}
j++;

}
i++;
}

transform(t,n);
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment2(j,k,i);

}
j++;

}
i++;
}

int maxi=cmp[0][0];
for(i=0;i<n;i++){
for (j=0;j<n;j++){

if(cmp[i][j]>maxi){
maxi=cmp[i][j];
row=i;
col=j;
}
}
}

cout<<row+1<<" "<<col+1;

return 0;
}


#include <iostream>
#include <string>

using namespace std;
int cmp[100][100];
void transform(string t[],int n){
char x;
for(int i=0;i<n/2;i++){
 for(int j=i;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}

}

void increment(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[i][j]++;
}
}
void increment2(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[j][i]++;
}
}
int main(){
int k,n,i,row=0,col=0,j;

string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<n;i++){
for (j=0;j<n;j++){
cmp[i][j]=0;
}

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment(j,k,i);

}
j++;

}
i++;
}

transform(t,n);
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment2(j,k,i);

}
j++;

}
i++;
}

int maxi=cmp[0][0];
for(i=0;i<n;i++){
for (j=0;j<n;j++){

if(cmp[i][j]>maxi){
maxi=cmp[i][j];
row=i;
col=j;
}
}
}

cout<<row+1<<" "<<col+1<<endl;

return 0;
}


#include <iostream>
#include <string>
#include <cmath>

using namespace std;
int cmp[100][100];
void transform(string t[],int n){
char x;
for(int i=0;i<ceil((double)n/2);i++){
 for(int j=i;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}

}

void increment(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[i][j]++;
}
}
void increment2(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[j][i]++;
}
}
int main(){
int k,n,i,row=0,col=0,j;

string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<n;i++){
for (j=0;j<n;j++){
cmp[i][j]=0;
}

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment(j,k,i);

}
j++;

}
i++;
}

transform(t,n);
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment2(j,k,i);

}
j++;

}
i++;
}

int maxi=cmp[0][0];
for(i=0;i<n;i++){
for (j=0;j<n;j++){

if(cmp[i][j]>maxi){
maxi=cmp[i][j];
row=i;
col=j;
}
}
}

cout<<row+1<<" "<<col+1<<endl;

return 0;
}


#include <iostream>
#include <string>

using namespace std;
int cmp[100][100];
void transform(string t[],int n){
char x;
for(int i=0;i<=(n-1)/2;i++){
 for(int j=i;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}

}

void increment(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[i][j]++;
}
}
void increment2(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[j][i]++;
}
}
int main(){
int k,n,i,row=0,col=0,j;

string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<n;i++){
for (j=0;j<n;j++){
cmp[i][j]=0;
}

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment(j,k,i);

}
j++;

}
i++;
}

transform(t,n);
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment2(j,k,i);

}
j++;

}
i++;
}

int maxi=cmp[0][0];
for(i=0;i<n;i++){
for (j=0;j<n;j++){

if(cmp[i][j]>maxi){
maxi=cmp[i][j];
row=i;
col=j;
}
}
}

cout<<row+1<<" "<<col+1<<endl;

return 0;
}


#include <iostream>
#include <string>

using namespace std;
int cmp[100][100];
void transform(string t[],int n){
char x;
for(int i=0;i<n;i++){
 for(int j=i;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}

}

void increment(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[i][j]++;
}
}
void increment2(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[j][i]++;
}
}
int main(){
int k,n,i,row=0,col=0,j;

string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<n;i++){
for (j=0;j<n;j++){
cmp[i][j]=0;
}

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment(j,k,i);

}
j++;

}
i++;
}

transform(t,n);
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment2(j,k,i);

}
j++;

}
i++;
}

int maxi=cmp[0][0];
for(i=0;i<n;i++){
for (j=0;j<n;j++){

if(cmp[i][j]>maxi){
maxi=cmp[i][j];
row=i;
col=j;
}
}
}

cout<<row+1<<" "<<col+1<<;

return 0;
}


#include <iostream>
#include <string>

using namespace std;
int cmp[100][100];
void transform(string t[],int n){
char x;
for(int i=0;i<=n/2;i++){
 for(int j=i;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}

}

void increment(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[i][j]++;
}
}
void increment2(int h,int n,int i){
for(int j=h;j<h+n;j++){
cmp[j][i]++;
}
}
int main(){
int k,n,i,row=0,col=0,j;

string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<n;i++){
for (j=0;j<n;j++){
cmp[i][j]=0;
}

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment(j,k,i);

}
j++;

}
i++;
}

transform(t,n);
i=0;
while(i<n){
j=0;
while(j+k<=n){
if(t[i].substr(j,k)==ch){
increment2(j,k,i);

}
j++;

}
i++;
}

int maxi=cmp[0][0];
for(i=0;i<n;i++){
for (j=0;j<n;j++){

if(cmp[i][j]>maxi){
maxi=cmp[i][j];
row=i;
col=j;
}
}
}

cout<<row+1<<" "<<col+1<<endl;

return 0;
}


#include <iostream>
#include <string>

using namespace std;
void transform(string t[],int n){
char x;
for(int i=0;i<n;i++){
 for(int j=0;j<n;j++){
   x=t[i][j];
   t[i][j]=t[j][i];
   t[j][i]=x;
}

}

}
int main(){
int k,n,i,row,col,j;
string ch="";
string t[100];
cin>>n>>k;
for(i=0;i<n;i++){
cin>>t[i];

}
for(i=0;i<k;i++){
ch+='.';
}
i=0;

bool ok=true;
while(ok && i<n){
j=0;
while(ok && j+k<=n){
if(t[i].substr(j,k)!=ch){
j++;

}
else{

ok=false;
row=i+1;
col=j+1;
}

}
i++;
}
if(!ok){
cout<<row<<" "<<col;
}
else{
transform(t,n);
i=0;
while(ok && i<n){
j=0;
while(ok && j+k<=n){
if(t[i].substr(j,k)!=ch){
j++;

}
else{

ok=false;
row=j+1;
col=i+1;
}

}
i++;
}
if(!ok){
cout<<row<<" "<<col;
}
else{
cout<<1<<" "<<1;
}
}

return 0;
}