#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define up upper_bound
#define vll vector<ll>
#define G vector<vll >
#define gg vector<int>
#define F first
#define S second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define RFOR(i,a,b) for(int i=a;i>=b;i--)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define endl '\n'
#define clr(a) memset(a,0,sizeof(a))
#define all(x) x.begin(),x.end()
#define rll read_ll();
#define gc getchar
#define pc putchar
typedef long long ll;
template<class T> inline T lcm(T a,T b){
        return a/gcd(a,b)*b;
}
template<typename T>
void debug(T first) {
    cout << first << "\n";
}
template<typename T, typename... Args>
void debug(T first, Args... args) {
    cout << first << " ";
    debug(args...);
}

ll read_ll(){char c=gc();while((c<'0'||c>'9')&&c!='-')c=gc();ll ret=0;int neg=0;if(c=='-')neg=1,c=gc();while(c>='0'&&c<='9'){ret=10*ret+c-48;c=gc();}return neg?-ret:ret;}
const int N = 100;
ll dp[N+2][4001];

struct item {
   ll t,p,d,pos;
};

bool cmp(item a, item b)
{
    return a.d < b.d;
}

int main()
{
    char c;
    int n,k;
    cin>>n>>k;
    int above[n+1][n+1], left[n+1][n+1], below[n+2][n+2], right[n+2][n+2];

    clr(above); clr(left); clr(below); clr(right);

    vector<vector<int> >mat(n+1,vector<int>(n+1,0));
    FOR(i,1,n)
    {
        string s;cin>>s;
        FOR(j,0,n-1)
        {
            if(s[j] == '.')
            mat[i][j+1] = 1;
        }
    }

    // above
    if(mat[1][1]) above[1][1] = 1, left[1][1] = 1;
    FOR(i,2,n) if(mat[1][i]) above[1][i] = 1;
    FOR(i,2,n) if(mat[i][1]) left[i][1] = 1;

    FOR(i,2,n)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            above[i][j]=above[i-1][j]+1;
            else above[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        FOR(j,2,n)
        {
            if(mat[i][j])
            left[i][j]=left[i][j-1]+1;
            else left[i][j] = 0;
        }
    }

    RFOR(i,n,1)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            below[i][j] += below[i+1][j]+1;
            else below[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        RFOR(j,n,1)
        {
            if(mat[i][j])
            right[i][j] = right[i][j+1]+1;
            else right[i][j] = 0;
        }
    }

    int maxi = INT_MIN;
    pair<int,int> point = {n,n};

    FOR(i,1,n)
    {
        FOR(j,1,n)
        {
            if(!mat[i][j])continue;
            int hori, vert; hori = vert = 0;
            if(left[i][j]>=k) hori+=1;
            if(right[i][j]>=k) hori+=1;
            if(above[i][j]>=k) vert+=1;
            if(below[i][j]>=k) vert+=1;
            int le = left[i][j]-1, ri = right[i][j]-1;
            int hori1 = 0, hori2 = 0;
            if(le>0 && ri >=k )
            hori1 = min(le,k);
            if(ri>0 && le >=k)
            hori2 = min(ri,k);

            int ab = above[i][j]-1, be = below[i][j]-1;
            int vert1 = 0, vert2 = 0;
            if(be>0 && ab >=k )
            vert1 = min(be,k);
            if(ab>0 && be >=k)
            vert2 = min(ab,k);

            vert += max(vert1,vert2);

            auto tt = vert + hori;
            if(tt > maxi)
                maxi = tt, point = {i,j};
        }
        // cout<<endl;
    }
    cout<<point.F<<" "<<point.S<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define up upper_bound
#define vll vector<ll>
#define G vector<vll >
#define gg vector<int>
#define F first
#define S second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define RFOR(i,a,b) for(int i=a;i>=b;i--)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define endl '\n'
#define clr(a) memset(a,0,sizeof(a))
#define all(x) x.begin(),x.end()
#define rll read_ll();
#define gc getchar
#define pc putchar
typedef long long ll;
template<class T> inline T lcm(T a,T b){
        return a/gcd(a,b)*b;
}
template<typename T>
void debug(T first) {
    cout << first << "\n";
}
template<typename T, typename... Args>
void debug(T first, Args... args) {
    cout << first << " ";
    debug(args...);
}

ll read_ll(){char c=gc();while((c<'0'||c>'9')&&c!='-')c=gc();ll ret=0;int neg=0;if(c=='-')neg=1,c=gc();while(c>='0'&&c<='9'){ret=10*ret+c-48;c=gc();}return neg?-ret:ret;}
const int N = 100;
ll dp[N+2][4001];

struct item {
   ll t,p,d,pos;
};

bool cmp(item a, item b)
{
    return a.d < b.d;
}

int main()
{
    char c;
    int n,k;
    cin>>n>>k;
    int above[n+1][n+1], left[n+1][n+1], below[n+2][n+2], right[n+2][n+2];

    clr(above); clr(left); clr(below); clr(right);

    vector<vector<int> >mat(n+1,vector<int>(n+1,0));
    FOR(i,1,n)
    {
        string s;cin>>s;
        FOR(j,0,n-1)
        {
            if(s[j] == '.')
            mat[i][j+1] = 1;
        }
    }

    // above
    if(mat[1][1]) above[1][1] = 1, left[1][1] = 1;
    FOR(i,2,n) if(mat[1][i]) above[1][i] = 1;
    FOR(i,2,n) if(mat[i][1]) left[i][1] = 1;

    FOR(i,2,n)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            above[i][j]=above[i-1][j]+1;
            else above[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        FOR(j,2,n)
        {
            if(mat[i][j])
            left[i][j]=left[i][j-1]+1;
            else left[i][j] = 0;
        }
    }

    RFOR(i,n,1)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            below[i][j] += below[i+1][j]+1;
            else below[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        RFOR(j,n,1)
        {
            if(mat[i][j])
            right[i][j] = right[i][j+1]+1;
            else right[i][j] = 0;
        }
    }

    int maxi = INT_MIN;
    pair<int,int> point = {n,n};

    FOR(i,1,n)
    {
        FOR(j,1,n)
        {
            if(!mat[i][j])continue;
            if(k==1) return !printf("%d %d",i,j);
            int l = left[i][j], r = right[i][j], u = above[i][j], d = below[i][j];
            auto tt = min(k,max(0,l+r-k)) + min(k,max(0,u+d-k));
            if(tt > maxi)
                maxi = tt, point = {i,j};
        }
        // cout<<endl;
    }
    cout<<point.F<<" "<<point.S<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define up upper_bound
#define vll vector<ll>
#define G vector<vll >
#define gg vector<int>
#define F first
#define S second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define RFOR(i,a,b) for(int i=a;i>=b;i--)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define endl '\n'
#define clr(a) memset(a,0,sizeof(a))
#define all(x) x.begin(),x.end()
#define rll read_ll();
#define gc getchar
#define pc putchar
typedef long long ll;
template<class T> inline T lcm(T a,T b){
        return a/gcd(a,b)*b;
}
template<typename T>
void debug(T first) {
    cout << first << "\n";
}
template<typename T, typename... Args>
void debug(T first, Args... args) {
    cout << first << " ";
    debug(args...);
}

ll read_ll(){char c=gc();while((c<'0'||c>'9')&&c!='-')c=gc();ll ret=0;int neg=0;if(c=='-')neg=1,c=gc();while(c>='0'&&c<='9'){ret=10*ret+c-48;c=gc();}return neg?-ret:ret;}
const int N = 100;
ll dp[N+2][4001];

struct item {
   ll t,p,d,pos;
};

bool cmp(item a, item b)
{
    return a.d < b.d;
}

int main()
{
    char c;
    int n,k;
    cin>>n>>k;
    int above[n+1][n+1], left[n+1][n+1], below[n+2][n+2], right[n+2][n+2];

    clr(above); clr(left); clr(below); clr(right);

    vector<vector<int> >mat(n+1,vector<int>(n+1,0));
    FOR(i,1,n)
    {
        string s;cin>>s;
        FOR(j,0,n-1)
        {
            if(s[j] == '.')
            mat[i][j+1] = 1;
        }
    }

    // above
    if(mat[1][1]) above[1][1] = 1, left[1][1] = 1;
    FOR(i,2,n) if(mat[1][i]) above[1][i] = 1;
    FOR(i,2,n) if(mat[i][1]) left[i][1] = 1;

    FOR(i,2,n)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            above[i][j]=above[i-1][j]+1;
            else above[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        FOR(j,2,n)
        {
            if(mat[i][j])
            left[i][j]=left[i][j-1]+1;
            else left[i][j] = 0;
        }
    }

    RFOR(i,n,1)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            below[i][j] += below[i+1][j]+1;
            else below[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        RFOR(j,n,1)
        {
            if(mat[i][j])
            right[i][j] = right[i][j+1]+1;
            else right[i][j] = 0;
        }
    }

    int maxi = INT_MIN;
    pair<int,int> point = {n,n};

    FOR(i,1,n)
    {
        FOR(j,1,n)
        {
            if(!mat[i][j])continue;
            if(k==1) return !printf("%d %d",i,j);
            int hori, vert; hori = vert = 0;
            if(left[i][j]>=k) hori+=1;
            if(right[i][j]>=k) hori+=1;
            if(above[i][j]>=k) vert+=1;
            if(below[i][j]>=k) vert+=1;
            int le = left[i][j]-1, ri = right[i][j]-1;
            int hori1 = 0, hori2 = 0;
            if(le>0 && ri >=k )
            hori1 = min(le,k);
            if(ri>0 && le >=k)
            hori2 = min(ri,k);

            int ab = above[i][j]-1, be = below[i][j]-1;
            int vert1 = 0, vert2 = 0;
            if(be>0 && ab >=k )
            vert1 = min(be,k);
            if(ab>0 && be >=k)
            vert2 = min(ab,k);

            vert += max(vert1,vert2);

            auto tt = vert + hori;
            // if(i == 2 && j == 3)
            // {
            //     cout<<vert1<<" "<<vert2<<endl;
            //     cout<<hori1<<" "<<hori2<<endl;
            //     cout<<vert<<" "<<hori<<endl;
            // }
            if(tt > maxi)
                maxi = tt, point = {i,j};
        }
        // cout<<endl;
    }
    cout<<point.F<<" "<<point.S<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define up upper_bound
#define vll vector<ll>
#define G vector<vll >
#define gg vector<int>
#define F first
#define S second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define RFOR(i,a,b) for(int i=a;i>=b;i--)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define endl '\n'
#define clr(a) memset(a,0,sizeof(a))
#define all(x) x.begin(),x.end()
#define rll read_ll();
#define gc getchar
#define pc putchar
typedef long long ll;
template<class T> inline T lcm(T a,T b){
        return a/gcd(a,b)*b;
}
template<typename T>
void debug(T first) {
    cout << first << "\n";
}
template<typename T, typename... Args>
void debug(T first, Args... args) {
    cout << first << " ";
    debug(args...);
}

ll read_ll(){char c=gc();while((c<'0'||c>'9')&&c!='-')c=gc();ll ret=0;int neg=0;if(c=='-')neg=1,c=gc();while(c>='0'&&c<='9'){ret=10*ret+c-48;c=gc();}return neg?-ret:ret;}
const int N = 100;
ll dp[N+2][4001];

struct item {
   ll t,p,d,pos;
};

bool cmp(item a, item b)
{
    return a.d < b.d;
}

int main()
{
    char c;
    int n,k;
    cin>>n>>k;
    int above[n+1][n+1], left[n+1][n+1], below[n+2][n+2], right[n+2][n+2];

    clr(above); clr(left); clr(below); clr(right);

    vector<vector<int> >mat(n+1,vector<int>(n+1,0));
    FOR(i,1,n)
    {
        string s;cin>>s;
        FOR(j,0,n-1)
        {
            if(s[j] == '.')
            mat[i][j+1] = 1;
        }
    }

    // above
    if(mat[1][1]) above[1][1] = 1, left[1][1] = 1;
    FOR(i,2,n) if(mat[1][i]) above[1][i] = 1;
    FOR(i,2,n) if(mat[i][1]) left[i][1] = 1;

    FOR(i,2,n)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            above[i][j]=above[i-1][j]+1;
            else above[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        FOR(j,2,n)
        {
            if(mat[i][j])
            left[i][j]=left[i][j-1]+1;
            else left[i][j] = 0;
        }
    }

    RFOR(i,n,1)
    {
        FOR(j,1,n)
        {
            if(mat[i][j])
            below[i][j] += below[i+1][j]+1;
            else below[i][j] = 0;
        }
    }

    FOR(i,1,n)
    {
        RFOR(j,n,1)
        {
            if(mat[i][j])
            right[i][j] = right[i][j+1]+1;
            else right[i][j] = 0;
        }
    }

    int maxi = INT_MIN;
    pair<int,int> point = {n,n};

    FOR(i,1,n)
    {
        FOR(j,1,n)
        {
            if(!mat[i][j])continue;
            if(k==1) return !printf("%d %d",i,j);
            int hori, vert; hori = vert = 0;
            if(left[i][j]>=k) hori+=1;
            if(right[i][j]>=k) hori+=1;
            if(above[i][j]>=k) vert+=1;
            if(below[i][j]>=k) vert+=1;
            int le = left[i][j]-1, ri = right[i][j]-1;
            int hori1 = 0, hori2 = 0;
            if(le>0 && ri >=k )
            hori1 = min(le,k);
            if(ri>0 && le >=k)
            hori2 = min(ri,k);

            int ab = above[i][j]-1, be = below[i][j]-1;
            int vert1 = 0, vert2 = 0;
            if(be>0 && ab >=k )
            vert1 = min(be,k);
            if(ab>0 && be >=k)
            vert2 = min(ab,k);

            vert += max(vert1,vert2);

            auto tt = vert + hori;
            // if(i == 2 && j == 3)
            // {
            //     cout<<vert1<<" "<<vert2<<endl;
            //     cout<<hori1<<" "<<hori2<<endl;
            //     cout<<vert<<" "<<hori<<endl;
            // }
            if(tt > maxi)
                maxi = tt, point = {i,j};
        }
        // cout<<endl;
    }
    cout<<point.F<<" "<<point.S<<" "<<maxi<<endl;
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define hell 1000000007
using namespace std;

ll gcd(ll a,ll b)
{
	if (a%b==0)
		return b;
	else
		return gcd(b,a%b);
}
void palindrome(string s)
{
	int i =0;
	int j =s.size()-1;
	while(i<j)
	{
		if(s[i]!=s[j])
			return ;
		i++;
		j--;
	}
	cout<<s;
	exit(0);
}
int recursive(int n,int a[])
{
	int x =1;
	if(a[n]!=0)
		return a[n];
	if(n<10)
		return n;
	while(n!=0)
	{
		if(n%10 !=0)
			x =x * (n%10);
		n=n/10;
	}
	return recursive(x,a);
}

int main()
{
	char c;
	int n ,k;
	cin>>n>>k;
	int a[n][n];
	int b[n][n] ;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
			b[i][j]=0;
	}
	//cout<<b[2][2]<<endl;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			cin>>c;
			if(c=='#')
				a[i][j] = 0;
			else
				a[i][j] =1;
		}
	}
	for(int i =0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(a[i][j]==0)
				continue;
			else
			{
				int l = 1;
				for(int z = j+1;z<j+k;z++)
				{
					if(a[i][z] == 1 && z<n)
						l++;
					else if(a[i][z]==0 && z<n)
						break;
					else if(l==k)
						break;
				}
				if(l==k){
				for(int z =j ;z <j+k ;z++)
				{
					b[i][z]++;
				}}
			}

		}
	}
	for(int j =0;j<n;j++)
	{
		for(int i = 0;i<n;i++)
		{
			if(a[i][j]==1)
			{
				int l = 1;
				for(int z = i+1;z<i+k;z++)
				{
					if(a[z][j] == 1 &&z<n)
						l++;
					else if(a[z][j]==0 && z<n)
						break;
					else if( l==k)
						break;
				}
				if(l==k)
				for(int z =i ;z <i+k ;z++)
				{
					b[z][j]++;
				}
			}
			else
				continue;
		}
	}
	int maxi =0,p,q;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			if(b[i][j]>=maxi)
			{
				p= i+1;
				q=j+1;
				maxi = b[i][j];
			}
			//cout<<b[i][j]<<" ";
		}
		//cout<<endl;

	}
	cout<<p<<" "<<q;
	//cout<<maxi;
}


#include<bits/stdc++.h>
#define ll long long
#define hell 1000000007
using namespace std;
int a[100][100];
	int b[100][100] ;
ll gcd(ll a,ll b)
{
	if (a%b==0)
		return b;
	else
		return gcd(b,a%b);
}
void palindrome(string s)
{
	int i =0;
	int j =s.size()-1;
	while(i<j)
	{
		if(s[i]!=s[j])
			return ;
		i++;
		j--;
	}
	cout<<s;
	exit(0);
}
int recursive(int n,int a[])
{
	int x =1;
	if(a[n]!=0)
		return a[n];
	if(n<10)
		return n;
	while(n!=0)
	{
		if(n%10 !=0)
			x =x * (n%10);
		n=n/10;
	}
	return recursive(x,a);
}

int main()
{
	char c;
	int n ,k;
	cin>>n>>k;
//	int a[n][n];
//	int b[n][n] ;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
			b[i][j]=0;
	}
	//cout<<b[2][2]<<endl;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			cin>>c;
			if(c=='#')
				a[i][j] = 0;
			else
				a[i][j] =1;
		}
	}
	for(int i =0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(a[i][j]==0)
				continue;
			else
			{
				int l = 1;
				for(int z = j+1;z<j+k;z++)
				{
					if(a[i][z] == 1 && z<n)
						l++;
					else if(a[i][z]==0 && z<n)
						break;
					else if(l==k)
						break;
				}
				if(l==k){
				for(int z =j ;z <j+k ;z++)
				{
					b[i][z]++;
				}}
			}

		}
	}
	for(int j =0;j<n;j++)
	{
		for(int i = 0;i<n;i++)
		{
			if(a[i][j]==1)
			{
				int l = 1;
				for(int z = i+1;z<i+k;z++)
				{
					if(a[z][j] == 1 &&z<n)
						l++;
					else if(a[z][j]==0 && z<n)
						break;
					else if( l==k)
						break;
				}
				if(l==k)
				for(int z =i ;z <i+k ;z++)
				{
					b[z][j]++;
				}
			}
			else
				continue;
		}
	}
	int maxi =0,p,q;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			if(b[i][j]>=maxi)
			{
				p= i+1;
				q=j+1;
				maxi = b[i][j];
			}
			//cout<<b[i][j]<<" ";
		}
		//cout<<endl;

	}
	cout<<p<<" "<<q;
	//cout<<maxi;
}


#include<bits/stdc++.h>
#define ll long long
#define hell 1000000007
using namespace std;
ll gcd(ll a,ll b)
{
	if (a%b==0)
		return b;
	else
		return gcd(b,a%b);
}
void palindrome(string s)
{
	int i =0;
	int j =s.size()-1;
	while(i<j)
	{
		if(s[i]!=s[j])
			return ;
		i++;
		j--;
	}
	cout<<s;
	exit(0);
}
int recursive(int n,int a[])
{
	int x =1;
	if(a[n]!=0)
		return a[n];
	if(n<10)
		return n;
	while(n!=0)
	{
		if(n%10 !=0)
			x =x * (n%10);
		n=n/10;
	}
	return recursive(x,a);
}

int main()
{
	char c;
	int n ,k;
	cin>>n>>k;
	int a[n][n];
	int b[n][n] ;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
			b[i][j]=0;
	}
	//cout<<b[2][2]<<endl;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			cin>>c;
			if(c=='#')
				a[i][j] = 0;
			else
				a[i][j] =1;
		}
	}
	for(int i =0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(a[i][j]==0)
				continue;
			else
			{
				int l = 1;
				for(int z = j+1;z<j+k;z++)
				{
					if(a[i][z] == 1 && z<n)
						l++;
					else if(a[i][z]==0 && z<n)
						break;
					else if(l==k)
						break;
				}
				if(l==k){
				for(int z =j ;z <j+k ;z++)
				{
					b[i][z]++;
				}}
			}

		}
	}
	for(int j =0;j<n;j++)
	{
		for(int i = 0;i<n;i++)
		{
			if(a[i][j]==1)
			{
				int l = 1;
				for(int z = i+1;z<i+k;z++)
				{
					if(a[z][j] == 1 &&z<n)
						l++;
					else if(a[z][j]==0 && z<n)
						break;
					else if( l==k)
						break;
				}
				if(l==k)
				for(int z =i ;z <i+k ;z++)
				{
					b[z][j]++;
				}
			}
			else
				continue;
		}
	}
	int maxi =0,p,q;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			if(b[i][j]>=maxi)
			{
				p= i+1;
				q=j+1;
				maxi = b[i][j];
			}
			//cout<<b[i][j]<<" ";
		}
		//cout<<endl;

	}
	cout<<p<<" "<<q;
	//cout<<maxi;
}


#include<bits/stdc++.h>
#define ll long long
#define hell 1000000007
using namespace std;
ll gcd(ll a,ll b)
{
	if (a%b==0)
		return b;
	else
		return gcd(b,a%b);
}
void palindrome(string s)
{
	int i =0;
	int j =s.size()-1;
	while(i<j)
	{
		if(s[i]!=s[j])
			return ;
		i++;
		j--;
	}
	cout<<s;
	exit(0);
}
int recursive(int n,int a[])
{
	int x =1;
	if(a[n]!=0)
		return a[n];
	if(n<10)
		return n;
	while(n!=0)
	{
		if(n%10 !=0)
			x =x * (n%10);
		n=n/10;
	}
	return recursive(x,a);
}

int main()
{
	char c;
	int n ,k;
	cin>>n>>k;
	int a[n][n];
	int b[n][n] ;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
			b[i][j]=0;
	}
	//cout<<b[2][2]<<endl;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			cin>>c;
			if(c=='#')
				a[i][j] = 0;
			else
				a[i][j] =1;
		}
	}
	for(int i =0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(a[i][j]==0)
				continue;
			else
			{
				int l = 1;
				for(int z = j+1;z<j+k;z++)
				{
					if(a[i][z] == 1 && z<n)
						l++;
					else if(a[i][z]==0 && z<n)
						break;
					else if(l==k)
						break;
				}
				if(l==k){
				for(int z =j ;z <j+k ;z++)
				{
					b[i][z]++;
				}}
			}

		}
	}
	for(int j =0;j<n;j++)
	{
		for(int i = 0;i<n;i++)
		{
			if(a[i][j]==1)
			{
				int l = 1;
				for(int z = i+1;z<i+k;z++)
				{
					if(a[z][j] == 1 &&z<n)
						l++;
					else if(a[z][j]==0 && z<n)
						break;
					else if( l==k)
						break;
				}
				if(l==k)
				for(int z =i ;z <i+k ;z++)
				{
					b[z][j]++;
				}
			}
			else
				continue;
		}
	}
	int maxi =0,p,q;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			/*if(b[i][j]>=maxi)
			{
				p= i+1;
				q=j+1;
				maxi = b[i][j];
			}*/
			cout<<b[i][j]<<" ";
		}
		cout<<endl;

	}
	cout<<p<<" "<<q;
	//cout<<maxi;
}


#include<bits/stdc++.h>
#define ll long long
#define hell 1000000007
using namespace std;
ll gcd(ll a,ll b)
{
	if (a%b==0)
		return b;
	else
		return gcd(b,a%b);
}
void palindrome(string s)
{
	int i =0;
	int j =s.size()-1;
	while(i<j)
	{
		if(s[i]!=s[j])
			return ;
		i++;
		j--;
	}
	cout<<s;
	exit(0);
}
int recursive(int n,int a[])
{
	int x =1;
	if(a[n]!=0)
		return a[n];
	if(n<10)
		return n;
	while(n!=0)
	{
		if(n%10 !=0)
			x =x * (n%10);
		n=n/10;
	}
	return recursive(x,a);
}

int main()
{
	char c;
	int n ,k;
	cin>>n>>k;
	int a[n][n];
	int b[n][n] ;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
			b[i][j]=0;
	}
	//cout<<b[2][2]<<endl;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			cin>>c;
			if(c=='#')
				a[i][j] = 0;
			else
				a[i][j] =1;
		}
	}
	for(int i =0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(a[i][j]!=1)
				continue;
			else
			{
				int l = 1;
				for(int z = j+1;z<j+k;z++)
				{
					if(a[i][z] == 1)
						l++;
					else if(a[i][z]==0 || l == k)
						break;
				}
				if(l==k)
				for(int z =j ;z <j+k ;z++)
				{
					b[i][j]++;
				}
			}

		}
	}
	for(int j =0;j<n;j++)
	{
		for(int i = 0;i<n;i++)
		{
			if(a[i][j]==1)
			{
				int l = 1;
				for(int z = i+1;z<i+k;z++)
				{
					if(a[z][j] == 1)
						l++;
					else if(a[z][j]==0 || l == k)
						break;
				}
				if(l==k)
				for(int z =i ;z <i+k ;z++)
				{
					b[z][j]++;
				}
			}
			else
				continue;
		}
	}
	int maxi =0,p,q;
	for(int i =0;i<n;i++)
	{
		for(int j =0;j<n;j++)
		{
			if(b[i][j]>=maxi )
			{
				p=i+1;
				q=j+1;
				maxi = b[i][j];

			}
		}
	}
	cout<<p<<" "<<q;
	//cout<<maxi;
}


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

int main()
{
    int n,k;
    string f[110];
    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cnt=0;
            bool flag=1;
            int gon=0;
            for(int p=j;p<j+k;p++){
                if(p>=n){
                    flag=0;
                    break;
                }
                if(f[i][p]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            if(gon==k){
                cnt++;
                gon=0;
            }
            //if(i==0 && j==7) cout<<cnt<<' '<<gon<<endl;

            if(gon)flag=1;
            else flag=0;
            for(int p=0+flag;p<k ;p++){
                if(j-p<0){
                    flag=0;
                    break;
                }
                if(f[i][j-p]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            cnt+=(int)floor((double)gon/(double)k);
            //if(i==0 && j==7) cout<<cnt<<' '<<gon<<endl;
            gon=0;
            for(int p=i;p<i+k;p++){
                if(p>=n){
                    flag=0;
                    break;
                }
                if(f[p][j]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            if(gon==k){
                cnt++;
                gon=0;
            }
            if(gon){
                flag=1;
            }else{
                flag=0;
            }
            for(int p=0+flag;p<k;p++){
                if(i-p<0){
                    flag=0;
                    break;
                }
                if(f[i-p][j]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            cnt+=(int)floor((double)gon/(double)k);
            //if(i==0 && j==7) cout<<cnt<<' '<<gon<<endl;
            if(cnt>mx){
                //cout<<gon<<endl;
                mx=cnt;
                x=i+1,y=j+1;
            }
        }
        if(mx==4){
            break;
        }
    }
    cout<<x<<' '<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,k;
string f[110];

int hor(int x,int y)
{
    int start=max(0,y-k+1);
    int cnt=0;
    for(int i=start;i<y+k;i++){
        if(f[x][i]=='.'){
            cnt++;
        }else{
            break;
        }
    }
    cnt=cnt-k+1;
    return max(cnt,0);
}

int ver(int x,int y)
{
    int start=max(0,x-k+1);
    int cnt=0;
    for(int i=start;i<x+k;i++){
        if(f[i][y]=='.'){
            cnt++;
        }else{
            break;
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}
int main()
{

    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            int a=hor(i,j);
            int b=ver(i,j);
            if(a+b>mx){
                mx=a+b;
                x=i+1,y=j+1;
            }
        }
    }
    cout<<x<<' '<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,k;
string f[110];

int hor(int x,int y)
{
    int start=max(0,y-k+1);
    int cnt=0;
    for(int i=start;i<min(n,y+k);i++){
        if(f[x][i]=='.'){
            cnt++;
        }else{
            cnt=0;
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}

int ver(int x,int y)
{
    int start=max(0,x-k+1);
    int cnt=0;
    for(int i=start;i<min(n,x+k);i++){
        if(f[i][y]=='.'){
            cnt++;
        }else{
            cnt=0;
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}
int main()
{

    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            int a=hor(i,j);
            int b=ver(i,j);
            if(a+b>mx){
                mx=a+b;
                x=i+1,y=j+1;
            }
        }
    }
    cout<<x<<' '<<y<<endl;
}


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

int main()
{
    int n,k;
    string f[110];
    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cnt=0;
            bool flag=1;
            int gon=0;
            for(int p=j;p<j+k;p++){
                if(p>=n){
                    flag=0;
                    break;
                }
                if(f[i][p]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            //if(i==0 && j==7) cout<<cnt<<' '<<gon<<endl;
            for(int p=1;p<k ;p++){
                if(j-p<0){
                    flag=0;
                    break;
                }
                if(f[i][j-p]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            if(gon>=k){
                cnt+=(int)ceil((double)gon/(double)k);
            }
            //if(i==0 && j==7) cout<<cnt<<' '<<gon<<endl;
            gon=0;
            for(int p=i;p<i+k;p++){
                if(p>=n){
                    flag=0;
                    break;
                }
                if(f[p][j]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            for(int p=1;p<k;p++){
                if(i-p<0){
                    flag=0;
                    break;
                }
                if(f[i-p][j]=='#'){
                    flag=0;
                    break;
                }
                gon++;
            }
            if(gon>=k){
                cnt+=(int)ceil((double)gon/(double)k);
            }
            //if(i==0 && j==7) cout<<cnt<<' '<<gon<<endl;
            if(cnt>mx){
                mx=cnt;
                x=i+1,y=j+1;
            }
        }
        if(mx==4){
            break;
        }
    }
    cout<<x<<' '<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,k;
string f[110];

int hor(int x,int y)
{
    int start=max(0,y-k+1);
    int cnt=0;
    for(int i=start;i<min(n,y+k);i++){
        if(f[x][i]=='.'){
            cnt++;
        }else{
            break;
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}

int ver(int x,int y)
{
    int start=max(0,x-k+1);
    int cnt=0;
    for(int i=start;i<min(n,x+k);i++){
        if(f[i][y]=='.'){
            cnt++;
        }else{
            break;
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}
int main()
{

    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            int a=hor(i,j);
            int b=ver(i,j);
            if(a+b>mx){
                mx=a+b;
                x=i+1,y=j+1;
            }
        }
    }
    cout<<x<<' '<<y<<endl;
}


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

int main()
{
    int n,k;
    string f[110];
    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cnt=0;
            bool flag=1;
            for(int p=j;p<j+k;p++){
                if(p>=n){
                    flag=0;
                    break;
                }
                if(f[i][p]=='#'){
                    flag=0;
                    break;
                }
            }
            cnt+=flag;
            flag=1;
            for(int p=0;p<k ;p++){
                if(j-p<0){
                    flag=0;
                    break;
                }
                if(f[i][j-p]=='#'){
                    flag=0;
                    break;
                }
            }
            cnt+=flag;
            flag=1;
            for(int p=i;p<i+k;p++){
                if(p>=n){
                    flag=0;
                    break;
                }
                if(f[p][j]=='#'){
                    flag=0;
                    break;
                }
            }
            cnt+=flag;
            flag=1;
            for(int p=0;p<k;p++){
                if(i-p<0){
                    flag=0;
                    break;
                }
                if(f[i-p][j]=='#'){
                    flag=0;
                    break;
                }
            }
            cnt+=flag;
            if(cnt>mx){
                mx=cnt;
                x=i+1,y=j+1;
            }
        }
        if(mx==4){
            break;
        }
    }
    cout<<x<<' '<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,k;
string f[110];

int hor(int x,int y)
{
    int start=max(0,y-k+1);
    int cnt=0;
    for(int i=start;i<min(n,y+k);i++){
        if(f[x][i]=='.'){
            cnt++;
        }else{
            if(cnt>=k){
                return cnt-k+1;
            }else{
                cnt=0;
            }
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}

int ver(int x,int y)
{
    int start=max(0,x-k+1);
    int cnt=0;
    for(int i=start;i<min(n,x+k);i++){
        if(f[i][y]=='.'){
            cnt++;
        }else{
            if(cnt>=k){
                return cnt-k+1;
            }else{
                cnt=0;
            }
        }
    }
    cnt=cnt-k+1;
    return max(0,cnt);
}
int main()
{

    cin>>n>>k;
    for(int i=0;i<n;i++){
        cin>>f[i];
    }
    int x=1,y=1;
    int mx=0,cnt=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            int a=hor(i,j);
            int b=ver(i,j);
            if(a+b>mx){
                mx=a+b;
                x=i+1,y=j+1;
            }
        }
    }
    cout<<x<<' '<<y<<endl;
}


    #include<bits/stdc++.h>
    #define pb push_back
    #define sz(a) ll((a).size())
    #define   pr  pair<ll,ll>
    #define all(c) (c).begin(),(c).end()
    #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
    #define SIZE 100002
    #define fi first
    #define se  second
    #define vi vector<ll>
    #define hell 998244353
    #define M_PI      3.14159265358979323846
    using namespace std;
    typedef long long int ll ;

    void machayenge(){
 ll n,m,k,d; cin>>n>>k>>m>>d;

   ll t=m;
   t=(m/k)*k;
   t++;
   ll mi=n/(k*d);
   if(n%(k*d)!=0) mi++;
  // cout<<mi<<"^"<<m;
   if(t<=m &&t>=mi ){
   	if((n/t)%k!=0)
   	cout<<t*((n/t)/k+1);
   	else cout<<t*((n/t)/k);
   return ;
   }
   else{
   	if((n/mi)%k!=0)
   			cout<<mi*((n/mi)/k+1);
   else cout<<mi*((n/mi)/k);
   return;
   }

   }

    int main(){
     ios_base::sync_with_stdio(false);
       cin.tie(NULL);
          cout.tie(0);

     machayenge();

    return 0;}


    #include<bits/stdc++.h>
    #define pb push_back
    #define sz(a) ll((a).size())
    #define   pr  pair<ll,ll>
    #define all(c) (c).begin(),(c).end()
    #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
    #define SIZE 100002
    #define fi first
    #define se  second
    #define vi vector<ll>
    #define hell 998244353
    #define M_PI      3.14159265358979323846
    using namespace std;
    typedef long long int ll ;

    void machayenge(){
   ll n,k; cin>>n>>k;
   char a[n][n];
   for(ll i=0;i<n;++i) {
   	for(ll j=0;j<n;++j) {
   		char tm; cin>>tm;
   		a[i][j]=tm;
   	}
   }
   ll d[n][n]={{0}};
   for(ll i=0;i<n;++i) for(ll j=0;j<n;++j)d[i][j]=0;

   for(ll i=0;i<n;++i){
   	for(ll j=0;j<n;++j){

   		if(a[i][j]=='.' ){
   			ll f=0;
   			ll k1=j;
   			while(k1<n&& a[i][k1]=='.') k1++;
   			ll k2=j;
   			while(k2>=0&&a[i][k2]=='.') k2--;
   			if(k1-k2-1 >=k) {f=1;
   				k2++;k1--;
   				ll co=k1-k2+1-k;

   				if(min(k1-i,i-k2)>=co) d[i][j]+=co+1;
   				else{
   					d[i][j]+=min(k1-j,j-k2)+1;
   				}
   				//if(i==0 && j==7) cout<<co<<"&&";
   			}
   			f=0;
   				k1=i;k2=i;
   				while(k2<n && a[k2][j]=='.') k2++;
   				while(k1>=0 && a[k1][j]=='.') k1--;
   				if(k2-k1-1>=k) {f=1;
   				k2--;k1++;
   				ll co=(k2-k1+1 -k);
   				if(min(k2-i,i-k1)>=co) d[i][j]+=co+1;
   				else{
   					d[i][j]+=min(k2-i,i-k1)+1;

   				}
   								if(i==0 && j==7) cout<<d[i][j]<<"&&";
   			}

   		}
   	}
   }
   ll ax=0,ay=0;
   ll tmp=0;
   for(ll i=0;i<n;++i){
   	for(ll j=0;j<n;++j){
   		//cout<<d[i][j]<<" ";
   		if(tmp<d[i][j]){
   			tmp=d[i][j];
   			ax=i;ay=j;
   		}
   	}
   }
cout<<ax+1<<" "<<ay+1;
//cout<<d[11][6]<<"^"<<d[0][7];
    }

    int main(){
     ios_base::sync_with_stdio(false);
       cin.tie(NULL);
          cout.tie(0);

     machayenge();

    return 0;}


    #include<bits/stdc++.h>
    #define pb push_back
    #define sz(a) ll((a).size())
    #define   pr  pair<ll,ll>
    #define all(c) (c).begin(),(c).end()
    #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
    #define SIZE 100002
    #define fi first
    #define se  second
    #define vi vector<ll>
    #define hell 998244353
    #define M_PI      3.14159265358979323846
    using namespace std;
    typedef long long int ll ;

    void machayenge(){
   ll n,k; cin>>n>>k;
   char a[n][n];
   for(ll i=0;i<n;++i) {
   	for(ll j=0;j<n;++j) {
   		char tm; cin>>tm;
   		a[i][j]=tm;
   	}
   }
   ll d[n][n]={{0}};
   for(ll i=0;i<n;++i) for(ll j=0;j<n;++j)d[i][j]=0;

   for(ll i=0;i<n;++i){
   	for(ll j=0;j<n;++j){

   		if(a[i][j]=='.' ){

   			ll k1=j;
   			while(k1<n&& a[i][k1]=='.') k1++;
   			ll k2=j;
   			while(k2>=0&&a[i][k2]=='.') k2--;
   			if(k1-k2-1 >=k) {
   				k2++;k1--;
   				ll co=k1-k2+1-k;
   				ll t=min(k1-j+1,j-k2+1);
   				t=min(co+1,t);
   				t=min(t,k);
   				d[i][j]+=t;
   				//if(i==18 && j==9) cout<<co<<"&&";
   			}

   				k1=i;k2=i;
   				while(k2<n && a[k2][j]=='.') k2++;
   				while(k1>=0 && a[k1][j]=='.') k1--;
   				if(k2-k1-1>=k) {
   				k2--;k1++;
   				ll co=(k2-k1+1 -k);
   				ll t=min(k2-i+1,i-k1+1);
   				t=min(t,k);
   				t=min(t,co+1);
   				d[i][j]+=t;

   			}
   		//	if(i==0 && j==7) cout<<d[i][j]<<"&&";
   		}
   	}
   }
   ll ax=0,ay=0;
   ll tmp=0;
   for(ll i=0;i<n;++i){
   	for(ll j=0;j<n;++j){
   		//cout<<d[i][j]<<" ";
   		if(tmp<d[i][j]){
   			tmp=d[i][j];
   			ax=i;ay=j;
   		}
   	}
   }
cout<<ax+1<<" "<<ay+1;
    }

    int main(){
     ios_base::sync_with_stdio(false);
       cin.tie(NULL);
          cout.tie(0);

     machayenge();

    return 0;}


    #include<bits/stdc++.h>
    #define pb push_back
    #define sz(a) ll((a).size())
    #define   pr  pair<ll,ll>
    #define all(c) (c).begin(),(c).end()
    #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
    #define SIZE 100002
    #define fi first
    #define se  second
    #define vi vector<ll>
    #define hell 998244353
    #define M_PI      3.14159265358979323846
    using namespace std;
    typedef long long int ll ;

    void machayenge(){
 ll n,m,k,d; cin>>n>>k>>m>>d;

   ll t=m;
   t=n/(k+1);

   ll mi=n/(k*d);
   if(n%(k*d)!=0) mi++;
  // cout<<mi<<"^"<<m;
   if(t<=m &&t>=mi ){
   	if((n/t)%k!=0)
   	cout<<t*((n/t)/k+1);
   	else cout<<t*((n/t)/k);
   return ;
   }
   else{
   	if((n/mi)%k!=0)
   			cout<<mi*((n/mi)/k+1);
   else cout<<mi*((n/mi)/k);
   return;
   }

   }

    int main(){
     ios_base::sync_with_stdio(false);
       cin.tie(NULL);
          cout.tie(0);

     machayenge();

    return 0;}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char mp[105][105];
int main(){
	int n,k,ans=-1,x,y;
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>mp[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(mp[i][j]=='#') continue;
			int num=0,len1=1,len2=1,len3=1,len4=1;
			for(int t=i+1;t<=n;t++){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len1++;
			}
			for(int t=i-1;t>=1;t--){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len2++;
			}
			for(int t=j+1;t<=n;t++){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len3++;
			}
			for(int t=j-1;t>=1;t--){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len4++;
			}
			num=min(k,min(len1,len2))+min(k,min(len3,len4));
			if(ans<num){
				ans=num;
				x=i;y=j;
			}
		}
	}
	cout<<x<<" "<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char mp[105][105];
int main(){
	int n,k,ans=-1,x,y;
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>mp[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(mp[i][j]=='#') continue;
			int num=0,len1=1,len2=1,len3=1,len4=1;
			for(int t=i+1;t<=n;t++){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len1++;
			}
			for(int t=i-1;t>=1;t--){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len2++;
			}
			for(int t=j+1;t<=n;t++){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len3++;
			}
			for(int t=j-1;t>=1;t--){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len4++;
			}
			num=min(k,len1+len2-k)+min(k,len3+len4-k);
			if(ans<num){
				ans=num;
				x=i;y=j;
			}
		}
	}
	cout<<x<<" "<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char mp[105][105];
int main(){
	int n,k,ans=-1,x,y;
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>mp[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(mp[i][j]=='#') continue;
			int num=0,len=1;
			for(int t=i+1;t<=n;t++){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			len=1;
			for(int t=i-1;t>=1;t--){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			len=1;
			for(int t=j+1;t<=n;t++){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			len=1;
			for(int t=j-1;t>=1;t--){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			if(ans<num){
				ans=num;
				x=i;y=j;
			}
		}
	}
	cout<<x<<" "<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char mp[105][105];
int main(){
	int n,k,ans=0,x,y;
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>mp[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(mp[i][j]=='#') continue;
			int num=0,len=1;
			for(int t=i+1;t<=n;t++){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			len=1;
			for(int t=i-1;t>=1;t--){
				if(mp[t][j]=='#') break;
				if(mp[t][j]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			len=1;
			for(int t=j+1;t<=n;t++){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			len=1;
			for(int t=j-1;t>=1;t--){
				if(mp[i][t]=='#') break;
				if(mp[i][t]=='.') len++;
				if(len>=k){
					num++;break;
				}
			}
			if(ans<num){
				ans=num;
				x=i;y=j;
			}
		}
	}
	cout<<x<<" "<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char mp[105][105];
int main(){
	int n,k,ans=-1,x=1,y=1;
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>mp[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(mp[i][j]=='#') continue;
			int num=0,len1=1,len2=1,len3=1,len4=1;
			for(int t=i+1;t<=n;t++){
				if(mp[t][j]=='#'||len1==k) break;
				if(mp[t][j]=='.') len1++;
			}
			for(int t=i-1;t>=1;t--){
				if(mp[t][j]=='#'||len2==k) break;
				if(mp[t][j]=='.') len2++;
			}
			for(int t=j+1;t<=n;t++){
				if(mp[i][t]=='#'||len3==k) break;
				if(mp[i][t]=='.') len3++;
			}
			for(int t=j-1;t>=1;t--){
				if(mp[i][t]=='#'||len4==k) break;
				if(mp[i][t]=='.') len4++;
			}
			num=max(0,min(min(len1,len2),len1+len2-k))+max(0,min(min(len3,len4),len3+len4-k));
			if(ans<num){
				ans=num;
				x=i;y=j;
			}
		}
	}
	//cout<<ans<<endl;
	cout<<x<<" "<<y<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char mp[105][105];
int main(){
	int n,k,ans=-1,x,y;
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>mp[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(mp[i][j]=='#') continue;
			int num=0,len1=1,len2=1,len3=1,len4=1;
			for(int t=i+1;t<=n;t++){
				if(mp[t][j]=='#'||len1==k) break;
				if(mp[t][j]=='.') len1++;
			}
			for(int t=i-1;t>=1;t--){
				if(mp[t][j]=='#'||len2==k) break;
				if(mp[t][j]=='.') len2++;
			}
			for(int t=j+1;t<=n;t++){
				if(mp[i][t]=='#'||len3==k) break;
				if(mp[i][t]=='.') len3++;
			}
			for(int t=j-1;t>=1;t--){
				if(mp[i][t]=='#'||len4==k) break;
				if(mp[i][t]=='.') len4++;
			}
			num=max(0,min(min(len1,len2),len1+len2-k))+max(0,min(min(len3,len4),len3+len4-k));
			if(ans<num){
				ans=num;
				x=i;y=j;
			}
		}
	}
	//cout<<ans<<endl;
	cout<<x<<" "<<y<<endl;
}


#include <bits/stdc++.h>
#include <stdint.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define clr(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
typedef vector<int> vi;
typedef pair<int, int> pii;
const double PI = acos(-1.0);
const int mod = 1e9 + 7;
int pows(int a , int b){int res=1;for(int i=0; i<b; ++i){res*=a;}return res;}
const int N = 1e4+5;
bool vis[105][105] ;
char arr[105][105] ;
int len[105][105];
int max_len = 0 , max_i = 0 , max_j = 0 , n , k ;
void init() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
}
void dfs(int x , int y){
    if(vis[x][y]) return ;
    vis[x][y] = true ;
    if(x>=n || y >=n)return ;
    int flag = 1 ;
    if(x+k <= n){
        for(int i = x ; i < x+k ; i++){
            if(arr[i][y]!=1)
            {
                flag = 0 ;
                break;
            }
        }
        if(flag==1){
            for(int i = x ; i < x+k ; i++){
                len[i][y]++;
                if(len[i][y] > max_len){
                    max_len = len[i][y] ;
                    max_i = i + 1 ;
                    max_j = y + 1 ;
                }
            }
        }
    }
    int flag2 = 1 ;
    if(y+k <= n){
        for(int i = y ; i < y+k ; i++){
            if(arr[x][i]!=1){
                flag2 = 0 ;
                break ;
            }
        }
        if(flag2){
            for(int i = y ; i < y+k ; i++){
                len[x][i]++;
                if(len[x][i] > max_len){
                    max_len = len[x][i] ;
                    max_i = x + 1 ;
                    max_j = i + 1 ;
                }
            }
        }
    }
    dfs(x+1,y) ;
    dfs(x,y+1) ;
}
void solve(){
    cin >> n >> k ;
    char ch ;
    memset(vis,false,sizeof vis) ;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin>> ch;
            if(ch=='#')
                arr[i][j]=0;
            else if(ch=='.')
                arr[i][j]=1;
        }
    }
    dfs(0,0) ;
    cout << max_i << " " << max_j << endl ;
}
int32_t main()
{
    init();
    int t=1;
    //cin>>t;
    clock_t launch=clock();

    while(t--)
    {
        solve();
    }

    clog<<((long double)(clock()-launch)/CLOCKS_PER_SEC)<<"\n";
}


#include <bits/stdc++.h>
#include <stdint.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define clr(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
typedef vector<int> vi;
typedef pair<int, int> pii;
const double PI = acos(-1.0);
const int mod = 1e9 + 7;
int pows(int a , int b){int res=1;for(int i=0; i<b; ++i){res*=a;}return res;}
const int N = 1e4+5;
bool vis[105][105] ;
int arr[105][105] ;
int len[105][105];
int max_len = 0 , max_i = 0 , max_j = 0 , n , k ;
void init() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
}
void dfs(int x , int y){
    if(vis[x][y]) return ;
    vis[x][y] = true ;
    if(x>=n || y >=n)return ;
    int flag = 1 ;
    if(x+k <= n){
        for(int i = x ; i < x+k ; i++){
            if(arr[i][y]!=1)
            {
                flag = 0 ;
                break;
            }
        }
        if(flag==1){
            for(int i = x ; i < x+k ; i++){
                len[i][y]++;
                if(len[i][y] > max_len){
                    max_len = len[i][y] ;
                    max_i = i + 1 ;
                    max_j = y + 1 ;
                }
            }
        }
    }
    int flag2 = 1 ;
    if(y+k <= n){
        for(int i = y ; i < y+k ; i++){
            if(arr[x][i]!=1){
                flag2 = 0 ;
                break ;
            }
        }
        if(flag2==1){
            for(int i = y ; i < y+k ; i++){
                len[x][i]++;
                if(len[x][i] > max_len){
                    max_len = len[x][i] ;
                    max_i = x + 1 ;
                    max_j = i + 1 ;
                }
            }
        }
    }
    dfs(x+1,y) ;
    dfs(x,y+1) ;
    return ;
}
void solve(){
    cin >> n >> k ;
    char c ;
    memset(vis,false,sizeof vis) ;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin>> c ;
            if(c=='#')
                arr[i][j]=0;
            else if(c=='.')
                arr[i][j]=1;
        }
    }
    dfs(0,0) ;
    cout << max_i << " " << max_j << endl ;
}
int32_t main()
{
    init();
    int t=1;
    //cin>>t;
    clock_t launch=clock();

    while(t--)
    {
        solve();
    }

    clog<<((long double)(clock()-launch)/CLOCKS_PER_SEC)<<"\n";
}


#include <bits/stdc++.h>
#include <stdint.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define clr(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
typedef vector<int> vi;
typedef pair<int, int> pii;
const double PI = acos(-1.0);
const int mod = 1e9 + 7;
int pows(int a , int b){int res=1;for(int i=0; i<b; ++i){res*=a;}return res;}
const int N = 1e4+5;
bool vis[105][105] ;
int arr[105][105] ;
int len[105][105];
int max_len = 0 , max_i = 0 , max_j = 0 , n , k ;
void init() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
}
void dfs(int x , int y){
    if(vis[x][y]) return ;
    vis[x][y] = true ;
    if(x>=n || y >=n)return ;
    int flag = 1 ;
    if(x+k <= n){
        for(int i = x ; i < x+k ; i++){
            if(arr[i][y]!=1)
            {
                flag = 0 ;
                break;
            }
        }
        if(flag==1){
            for(int i = x ; i < x+k ; i++){
                len[i][y]++;
                if(len[i][y] > max_len){
                    max_len = len[i][y] ;
                    max_i = i + 1 ;
                    max_j = y + 1 ;
                }
            }
        }
    }
    int flag2 = 1 ;
    if(y+k <= n){
        for(int i = y ; i < y+k ; i++){
            if(arr[x][i]!=1){
                flag2 = 0 ;
                break ;
            }
        }
        if(flag2==1){
            for(int i = y ; i < y+k ; i++){
                len[x][i]++;
                if(len[x][i] > max_len){
                    max_len = len[x][i] ;
                    max_i = x + 1 ;
                    max_j = i + 1 ;
                }
            }
        }
    }
    dfs(x+1,y) ;
    dfs(x,y+1) ;
    return ;
}
void solve(){
    cin >> n >> k ;
    char c ;
    memset(vis,false,sizeof vis) ;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin>> c ;
            if(ch=='#')
                arr[i][j]=0;
            else if(ch=='.')
                arr[i][j]=1;
        }
    }
    dfs(0,0) ;
    cout << max_i << " " << max_j << endl ;
}
int32_t main()
{
    init();
    int t=1;
    //cin>>t;
    clock_t launch=clock();

    while(t--)
    {
        solve();
    }

    clog<<((long double)(clock()-launch)/CLOCKS_PER_SEC)<<"\n";
}


#include <bits/stdc++.h>
#include <stdint.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define clr(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
typedef vector<int> vi;
typedef pair<int, int> pii;
const double PI = acos(-1.0);
const int mod = 1e9 + 7;
int pows(int a , int b){int res=1;for(int i=0; i<b; ++i){res*=a;}return res;}
const int N = 1e4+5;
bool vis[105][105] ;
int arr[105][105] ;
int len[105][105];
int max_len = 0 , max_i = 1 , max_j = 1 , n , k ;
void init() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
}
void dfs(int x , int y){
    if(vis[x][y]) return ;
    vis[x][y] = true ;
    if(x>=n || y >=n)return ;
    int flag = 1 ;
    if(x+k <= n){
        for(int i = x ; i < x+k ; i++){
            if(arr[i][y]!=1)
            {
                flag = 0 ;
                break;
            }
        }
        if(flag==1){
            for(int i = x ; i < x+k ; i++){
                len[i][y]++;
                if(len[i][y] > max_len){
                    max_len = len[i][y] ;
                    max_i = i + 1 ;
                    max_j = y + 1 ;
                }
            }
        }
    }
    int flag2 = 1 ;
    if(y+k <= n){
        for(int i = y ; i < y+k ; i++){
            if(arr[x][i]!=1){
                flag2 = 0 ;
                break ;
            }
        }
        if(flag2==1){
            for(int i = y ; i < y+k ; i++){
                len[x][i]++;
                if(len[x][i] > max_len){
                    max_len = len[x][i] ;
                    max_i = x + 1 ;
                    max_j = i + 1 ;
                }
            }
        }
    }
    dfs(x+1,y) ;
    dfs(x,y+1) ;
    return ;
}
void solve(){
    cin >> n >> k ;
    char c ;
    memset(vis,false,sizeof vis) ;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin>> c ;
            if(c=='#')
                arr[i][j]=0;
            else if(c=='.')
                arr[i][j]=1;
        }
    }
    dfs(0,0) ;
    cout << max_i << " " << max_j << endl ;
}
int32_t main()
{
    init();
    int t=1;
    //cin>>t;
    clock_t launch=clock();

    while(t--)
    {
        solve();
    }

    clog<<((long double)(clock()-launch)/CLOCKS_PER_SEC)<<"\n";
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
    int n, k, i, j, h;
    char grid[100][100];
    cin >> n >> k;
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
                cin >> grid[i][j];

    long long bestx = 1, besty = 1, best = 0, curv, curo;
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            if (grid[i][j] == '.') {
                curv = 1;
                curo = 1;
                h = i;
                while (h > 0 && grid[--h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = i;
                while (h < n - 1 && grid[++h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = j;
                while (h > 0 && grid[i][--h] == '.' && abs(h - j) < k)
                    curo++;
                h = j;
                while (h < n - 1 && grid[i][++h] == '.' && abs(h - j) < k)
                    curo++;
                curo -= k;
                curv -= k;
                if (++curo < 0) curo = 0;
                if (++curv < 0) curv = 0;
                curv += curo;
                if (curv > best) {
                    best = curv;
                    bestx = i + 1;
                    besty = j + 1;
                }
            }
    }

    cout << bestx << " " << besty << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
    int n, k, i, j, h;
    char grid[100][100];
    cin >> n >> k;
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
                cin >> grid[i][j];

    int bestx = 0, besty = 0, best = 0, curv, curo;
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            if (grid[i][j] == '.') {
                curv = 1;
                curo = 1;
                h = i;
                while (h >= 0 && grid[--h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = i;
                while (h < n && grid[++h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = j;
                while (h >= 0 && grid[i][--h] == '.' && abs(h - j) < k)
                    curo++;
                h = j;
                while (h >= 0 && grid[i][++h] == '.' && abs(h - j) < k)
                    curo++;
                curo -= k - 1;
                curv -= k - 1;
                if (curo < 0) curo = 0;
                if (curv < 0) curv = 0;
                curv += curo;
                if (curv > best) {
                    best = curv;
                    bestx = i + 1;
                    besty = j + 1;
                }
            }
    }

    cout << bestx << " " << besty << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
    int n, k, i, j, h;
    char grid[100][100];
    cin >> n >> k;
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
                cin >> grid[i][j];

    int bestx = 0, besty = 0, best = 0, curv, curo;
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            if (grid[i][j] == '.') {
                curv = 1;
                curo = 1;
                h = i;
                while (h >= 0 && grid[--h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = i;
                while (h < n && grid[++h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = j;
                while (h >= 0 && grid[i][--h] == '.' && abs(h - j) < k)
                    curo++;
                h = j;
                while (h < n && grid[i][++h] == '.' && abs(h - j) < k)
                    curo++;
                curo -= k - 1;
                curv -= k - 1;
                if (curo < 0) curo = 0;
                if (curv < 0) curv = 0;
                curv += curo;
                if (curv > best) {
                    best = curv;
                    bestx = i + 1;
                    besty = j + 1;
                }
            }
    }

    cout << bestx << " " << besty << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
    int n, k, i, j, h;
    char grid[100][100];
    cin >> n >> k;
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
                cin >> grid[i][j];

    long long bestx = 0, besty = 0, best = 0, curv, curo;
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            if (grid[i][j] == '.') {
                curv = 1;
                curo = 1;
                h = i;
                while (h >= 0 && grid[--h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = i;
                while (h < n && grid[++h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = j;
                while (h >= 0 && grid[i][--h] == '.' && abs(h - j) < k)
                    curo++;
                h = j;
                while (h < n && grid[i][++h] == '.' && abs(h - j) < k)
                    curo++;
                curo -= k;
                curv -= k;
                if (++curo < 0) curo = 0;
                if (++curv < 0) curv = 0;
                curv += curo;
                if (curv > best) {
                    best = curv;
                    bestx = i + 1;
                    besty = j + 1;
                }
            }
    }

    cout << bestx << " " << besty << endl;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
    int n, k, i, j, h;
    char grid[100][100];
    cin >> n >> k;
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
                cin >> grid[i][j];

    long long bestx = 0, besty = 0, best = 0, curv, curo;
    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            if (grid[i][j] == '.') {
                curv = 1;
                curo = 1;
                h = i;
                while (h > 0 && grid[--h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = i;
                while (h < n - 1 && grid[++h][j] == '.' && abs(h - i) < k)
                    curv++;
                h = j;
                while (h > 0 && grid[i][--h] == '.' && abs(h - j) < k)
                    curo++;
                h = j;
                while (h < n - 1 && grid[i][++h] == '.' && abs(h - j) < k)
                    curo++;
                curo -= k;
                curv -= k;
                if (++curo < 0) curo = 0;
                if (++curv < 0) curv = 0;
                curv += curo;
                if (curv > best) {
                    best = curv;
                    bestx = i + 1;
                    besty = j + 1;
                }
            }
    }

    cout << bestx << " " << besty << endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
	ll n, k;
	cin >> n >> k;

	vector<vector<char>>A;
	vector<vector<ll>>B;

	B.resize(n, vector<ll>(n));
	A.resize(n, vector<char>(n));

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			cin >> A[i][j];
		}
	}
	ll ans = 0;
	ll x = 0, y = 0;

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

			for (int w = j; w<n; w++) {
				if (A[i][w] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}

			p = 0;

			for (int w = j; w >= 0; w--) {
				if (A[i][w] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}

			p = 0;

			for (int w = j; w<n; w++) {
				if (A[i][w] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			ll p1 = 0;
			for (int w = j; w >= 0; w--) {
				if (A[i][w] == '.') {
					p1++;
					if (p1 == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p1 + p >= k && (p != 0 && p1 != 0)) {
				B[i][j]++;
			}

		}
	}

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			ll p = 0;
			for (int w = i; w<n; w++) {
				if (A[w][j] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}
			p = 0;
			for (int w = i; w >= 0; w--) {
				if (A[w][j] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}

			p = 0;

			for (int w = i; w<n; w++) {
				if (A[w][j] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			ll p1 = 0;
			for (int w = i; w >= 0; w--) {
				if (A[w][j] == '.') {
					p1++;
					if (p1 == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p1 + p >= k && (p!=0 && p1!=0)) {
				B[i][j]++;
			}

		}
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (ans < B[i][j]) {
				ans = B[i][j];
				x = i;
				y = j;
			}
		}
	}

	cout << x + 1 << " " << y + 1;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
	ll n,k;
	cin >> n >> k;

	vector<vector<char>>A;
	vector<vector<ll>>B;

	B.resize(n, vector<ll>(n));
	A.resize(n, vector<char>(n));

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			cin >> A[i][j];
		}
	}
	ll ans = 0;
	ll x=0, y=0;

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

			for (int w = j; w<n; w++) {
				if (A[i][w] == '.') {
					p++;
					if (p == k) {
						break;
					}
				} else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}

			p = 0;

			for (int w = j; w>=0; w--) {
				if (A[i][w] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}
		}
	}

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			ll p = 0;
			for (int w = i; w<n; w++) {
				if (A[w][j] == '.') {
					p++;
					if (p == k) {
						break;
					}
				} else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}
			p = 0;
			for (int w = i; w>=0; w--) {
				if (A[w][j] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}
		}
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (ans < B[i][j]) {
				ans = B[i][j];
				x = i;
				y = j;
			}
		}
	}

	cout << x + 1 << " " << y + 1;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
	ll n;
	cin >> n;
	vector<vector<bool>>used;
	vector<vector<char>>A;

	A.resize(n, vector<char>(n));
	used.resize(n, vector<bool>(n));

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			cin >> A[i][j];
		}
	}
	ll ans = 0;
	ll x=0, y=0;
	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			if (A[i][j] == '#') {
				continue;
			}
			if (used[i][j] == true) {
				continue;
			}
			ll p = 0;
			for (int w = j; w<n; w++) {
				if (A[i][w] != '#' && used[i][w] == false) {
					used[i][w] = false;
					p++;
				}
			}
			if (p > ans) {
				ans = p;
				x = i;
				y = j;
			}
		}
	}
	used.clear();
	used.resize(n, vector<bool>(n));

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			if (A[i][j] == '#') {
				continue;
			}
			if (used[i][j] == true) {
				continue;
			}
			ll p = 0;
			for (int w = i; w<n; w++) {
				if (A[w][j] == '#' && used[w][j] == false) {
					used[w][j] = false;
					p++;
				}
			}
			if (p > ans) {
				ans = p;
				x = i;
				y = j;
			}
		}
	}
	cout << x + 1 << " " << y + 1;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
    ll n, k;
    cin >> n >> k;

    vector<vector<char>>A;
    vector<vector<ll>>B;

    B.resize(n, vector<ll>(n));
    A.resize(n, vector<char>(n));

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

    for (int i=0;i<n;i++){
        for (int j=0;j<n;j++){
            if (A[i][j]!='.'){
                continue;
            }

            ll p =0;
            for (int w=j;w<n;w++){
                if (A[i][w] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                for (int w=j;w<n;w++){
                    if (A[i][w] == '.'){
                        B[i][w]++;
                    }else{
                        break;
                    }
                }
            }

            p =0;
            for (int w=j;w>=0;w--){
                if (A[i][w] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                for (int w=j;w>=0;w--){
                    if (A[i][w] == '.'){
                        B[i][w]++;
                    }else{
                        break;
                    }
                }
            }

            p=0;
            for (int w=i;w<n;w++){
                if (A[w][j] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                for (int w=i;w<n;w++){
                    if (A[w][j] == '.'){
                        B[w][j]++;
                    }else{
                        break;
                    }
                }
            }

            p=0;
            for (int w=i;w>=0;w--){
                if (A[w][j] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                for (int w=i;w>=0;w--){
                    if (A[w][j] == '.'){
                        B[w][j]++;
                    }else{
                        break;
                    }
                }
            }

        }
    }
    ll ans=0;
    ll x=0,y=0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (ans < B[i][j]) {
                ans = B[i][j];
                x = i;
                y = j;
            }
        }
    }

    cout << x + 1 << " " << y + 1;

}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
    ll n, k;
    cin >> n >> k;

    vector<vector<char>>A;
    vector<vector<ll>>B;

    B.resize(n, vector<ll>(n));
    A.resize(n, vector<char>(n));

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

    for (int i=0;i<n;i++){
        for (int j=0;j<n;j++){
            if (A[i][j]!='.'){
                continue;
            }
            ll p =1 ;
            for (int w=j+1;w<n;w++){
                if(A[i][w] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                B[i][j]++;
                for (int w=j+1;w<n;w++){
                    if(A[i][w] == '.'){
                        B[i][w]++;
                    }else{
                        break;
                    }
                }
            }

            p=1;
            for (int w=i+1;w<n;w++){
                if(A[w][j] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                B[i][j]++;
                for (int w=i+1;w<n;w++){
                    if(A[w][i] == '.'){
                        B[w][i]++;
                    }else{
                        break;
                    }
                }
            }

            ll p1=1;
            for (int w=j-1;w>=0;w--){
                if(A[i][w] == '.'){
                    p1++;
                }else{
                    break;
                }
            }

            if(p1 >= k){
                B[i][j]++;
                for (int w=j-1;w>=0;w--){
                    if(A[i][w] == '.'){
                        B[i][w]++;
                    }else{
                        break;
                    }
                }
            }
            p1=1;

            for (int w=i-1;w>=0;w--){
                if(A[w][j] == '.'){
                    p1++;
                }else{
                    break;
                }
            }

            if(p1 >= k){
                B[i][j]++;
                for (int w=j-1;w>=0;w--){
                    if(A[w][j] == '.'){
                        B[w][j]++;
                    }else{
                        break;
                    }
                }
            }
        }
    }
    ll ans=0;
    ll x=0,y=0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (ans < B[i][j]) {
                ans = B[i][j];
                x = i;
                y = j;
            }
        }
    }

    cout << x + 1 << " " << y + 1;

}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
	ll n, k;
	cin >> n >> k;

	vector<vector<char>>A;
	vector<vector<ll>>B;

	B.resize(n, vector<ll>(n));
	A.resize(n, vector<char>(n));

	for (int i = 0; i<n; i++) {
		for (int j = 0; j<n; j++) {
			cin >> A[i][j];
		}
	}
	ll ans = 0;
	ll x = 0, y = 0;

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

			for (int w = j; w < n; w++) {
				if (A[i][w] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}

			ll p1 = 0;

			for (int w = j; w >= 0; w--) {
				if (A[i][w] == '.') {
					p1++;
					if (p1 == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p1 == k) {
				B[i][j]++;
			}if (p == 1 || p1 == 1) {
				continue;
			}
			if (p * p1 > 0) {
				if (p + p1 >= k) {
					B[i][j]++;
				}
			}
		}
	}

	for (int i = 0; i<n; i++) {
		for (int j = 0; j < n; j++) {
			ll p = 0;
			for (int w = i; w < n; w++) {
				if (A[w][j] == '.') {
					p++;
					if (p == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p == k) {
				B[i][j]++;
			}
			ll p1 = 0;
			for (int w = i; w >= 0; w--) {
				if (A[w][j] == '.') {
					p1++;
					if (p1 == k) {
						break;
					}
				}
				else {
					break;
				}
			}
			if (p1 == k) {
				B[i][j]++;
			}
			if (p == 1 || p1 == 1) {
				continue;
			}
			if (p * p1 > 0) {
				if (p + p1 >= k) {
					B[i][j]++;
				}
			}
		}
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (ans < B[i][j]) {
				ans = B[i][j];
				x = i;
				y = j;
			}
		}
	}

	cout << x + 1 << " " << y + 1;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll long long

using namespace std;
int main() {
    ll n, k;
    cin >> n >> k;

    vector<vector<char>>A;
    vector<vector<ll>>B;

    B.resize(n, vector<ll>(n));
    A.resize(n, vector<char>(n));

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

    for (int i=0;i<n;i++){
        for (int j=0;j<n;j++){
            if (A[i][j]!='.'){
                continue;
            }

            ll p =0;
            for (int w=j;w<n;w++){
                if (A[i][w] == '.'){
                    p++;
                }else{
                    break;
                }
            }
            if (p >= k){
                p=0;
                for (int w=j;w<n;w++){
                    if (A[i][w] == '.'){
                       p++;
                        B[i][w]++;
                        if (p == k){
                            break;
                        }
                    }else{
                        break;
                    }
                }
            }

            p =0;
            for (int w=j;w>=0;w--){
                if (A[i][w] == '.'){
                    p++;if (p == k){
                        break;
                    }
                }else{
                    break;
                }
            }
            if (p >= k){
                p=0;
                for (int w=j;w>=0;w--){
                    if (A[i][w] == '.'){
                        B[i][w]++;
                        p++;
                        if (p == k){
                            break;
                        }
                    }else{
                        break;
                    }
                }
            }

            p=0;
            for (int w=i;w<n;w++){
                if (A[w][j] == '.'){
                    p++;if (p == k){
                        break;
                    }
                }else{
                    break;
                }
            }
            if (p >= k){
                p=0;
                for (int w=i;w<n;w++){
                    if (A[w][j] == '.'){
                        B[w][j]++;
                        p++;if (p == k){
                            break;
                        }
                    }else{
                        break;
                    }
                }
            }

            p=0;
            for (int w=i;w>=0;w--){
                if (A[w][j] == '.'){
                    p++;
                    if (p == k){
                        break;
                    }
                }else{
                    break;
                }
            }
            if (p >= k){
                p=0;
                for (int w=i;w>=0;w--){
                    if (A[w][j] == '.'){
                        B[w][j]++;
                        p++;
                        if (p == k){
                            break;
                        }
                    }else{
                        break;
                    }
                }
            }

        }
    }
    ll ans=0;
    ll x=0,y=0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (ans < B[i][j]) {
                ans = B[i][j];
                x = i;
                y = j;
            }
        }
    }
    cout << x + 1 << " " << y + 1;

}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     cin>>a[i][j];
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     cin>>a[i][j];
     if(n==1) { cout<<1<<" "<<1<<endl; return 0; }
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
bool z=false;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++){
     cin>>a[i][j];
     if(a[i][j]=='.') z=true;
     }
     if(!z) { cout<<1<<" "<<1<<endl; return 0; }
     if(k==1){ cout<<1<<" "<<1<<endl; return 0; }
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
bool z=false;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++){
     cin>>a[i][j];
     if(a[i][j]=='.') z=true;
     }
     if(!z) { cout<<1<<" "<<1<<endl; return 0; }
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     cin>>a[i][j];
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
           if(i==6 &&j==3) cout<<ans<<endl;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
bool z=false;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++){
     cin>>a[i][j];
     if(a[i][j]=='.') z=true;
     }
     if(!z) { cout<<1<<" "<<endl; return 0; }
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include <bits/stdc++.h>
using namespace std;
int n,k;
char a[110][1010];
int m,g;
int mx=0;
bool z=false;
int pas,pas1,ans;
int main(){
     cin>>n>>k;
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++){
     cin>>a[i][j];
     if(a[i][j]=='.'){  z=true; m=i; g=j;}
     }
     if(!z) { cout<<1<<" "<<1<<endl; return 0; }
     if(k==1) { cout<<m<<" "<<g<<endl; return 0; }
     for(int i=1;i<=n;i++)
     for(int j=1;j<=n;j++)
     {
          if(a[i][j]=='#') continue;
          pas=0;
          pas1=0;
          ans=0;
          for(int x=i+1;x<=n;x++)
          if(a[x][j]=='.') pas++;
          else break;
          for(int x=i-1;x>=1;x--)
          if(a[x][j]=='.') pas1++;
          else break;
          if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
          if(pas+pas1+1<k) ans=0;
          else ans+=pas+pas1+2-k;
        //  if(i==6 &&j==3) cout<<ans<<endl;
       //  cout<<ans<<" ";
          pas=0;
          pas1=0;
            for(int x=j+1;x<=n;x++)
          if(a[i][x]=='.') pas++;
          else break;
          for(int x=j-1;x>=1;x--)
          if(a[i][x]=='.') pas1++;
          else break;
           if(pas1>k-1) pas1=k-1;
          if(pas>k-1) pas=k-1;
           if(pas+pas1+1>=k)
           ans+=pas+pas1+2-k;
         // cout<<ans<<" "<<i<<" "<<j<<endl;
          if(ans>mx) {mx=ans; m=i; g=j; }

     }
    cout<<m<<" "<<g<<endl;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl "\n"
#define M 1000000007
#define enter ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define test ll t; cin>>t; while(t--)
#define pb push_back
#define mp make_pair
#define mk(name,n,ty) ty* name=new ty[n];
typedef long long int ll;
typedef tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> PBDS;
int r[102][102]={0};
int c[102][102]={0};
int dp[102][102]={0};
int main(){
    int n,k;
    cin>>n>>k;
    char arr[n+1][n+1];
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		cin>>arr[i][j];
    		if(arr[i][j]=='.'){
    			r[i][j]=r[i][j-1]+1;
    			c[i][j]=r[i-1][j]+1;
    		}
    		    if(r[i][j]>=k){
    				for(int x=j;x>j-k;--x) dp[i][x]++;
    			}
    		    if(c[i][j]>=k){
    		    	for(int x=i;x>i-k;--x) dp[x][j]++;
    		    }
    	}
    }
    int ans=0;
    int x=1,y=1;
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		if(dp[i][j]>ans){
    			x=i;
    			y=j;
    			ans=dp[i][j];
    		}
    	}
    }
    cout<<x<<" "<<y<<endl;
    return 0;
  }


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl "\n"
#define M 1000000007
#define enter ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define test ll t; cin>>t; while(t--)
#define pb push_back
#define mp make_pair
#define mk(name,n,ty) ty* name=new ty[n];
typedef long long int ll;
typedef tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> PBDS;
int r[102][102]={0};
int c[102][102]={0};
int dp[102][102]={0};
int main(){
    int n,k;
    cin>>n>>k;
    char arr[n+1][n+1];
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		cin>>arr[i][j];
    		if(arr[i][j]=='.'){
    			r[i][j]=r[i][j-1]+1;
    			c[i][j]=r[i-1][j]+1;
    			if(r[i][j]>=k){
    				for(int x=j;x>j-k;x--) dp[i][x]++;
    			}
    		    if(c[i][j]>=k){
    		    	for(int x=i;x>i-k;x--) dp[x][j]++;
    		    }
    		}
    	}
    }
    int ans=0;
    int x=1,y=1;
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		if(dp[i][j]>ans){
    			x=i;
    			y=j;
    			ans=dp[i][j];
    		}
    	}
    }
    cout<<x<<" "<<y<<endl;
    return 0;
  }


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl "\n"
#define M 1000000007
#define enter ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define test ll t; cin>>t; while(t--)
#define pb push_back
#define mp make_pair
#define mk(name,n,ty) ty* name=new ty[n];
typedef long long int ll;
typedef tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> PBDS;
int r[102][102]={0};
int c[102][102]={0};
int dp[102][102]={0};
int main(){
    int n,k;
    cin>>n>>k;
    char arr[n+1][n+1];
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		cin>>arr[i][j];
    		if(arr[i][j]=='.'){
    			r[i][j]=r[i][j-1]+1;
    			c[i][j]=r[i-1][j]+1;
    			if(r[i][j]>=k){
    				for(int x=j;x>j-k;--x) dp[i][x]++;
    			}
    		    if(c[i][j]>=k){
    		    	for(int x=i;x>i-k;--x) dp[x][j]++;
    		    }
    		}
    	}
    }
    int ans=0;
    int x=1,y=1;
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		if(dp[i][j]>ans){
    			x=i;
    			y=j;
    			ans=dp[i][j];
    		}
    	}
    }
    cout<<x<<" "<<y<<endl;
    return 0;
  }


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl "\n"
#define M 1000000007
#define enter ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define test ll t; cin>>t; while(t--)
#define pb push_back
#define mp make_pair
#define mk(name,n,ty) ty* name=new ty[n];
typedef long long int ll;
typedef tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> PBDS;
int r[102][102]={0};
int c[102][102]={0};
int dp[102][102]={0};
int main(){
    int n,k;
    cin>>n>>k;
    char arr[n+1][n+1];
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		cin>>arr[i][j];
    		if(arr[i][j]=='.'){
    			r[i][j]=r[i][j-1]+1;
    			c[i][j]=c[i-1][j]+1;
    		}
    		    if(r[i][j]>=k){
    				for(int x=j;x>j-k;--x) dp[i][x]++;
    			}
    		    if(c[i][j]>=k){
    		    	for(int x=i;x>i-k;--x) dp[x][j]++;
    		    }
    	}
    }
    int ans=0;
    int x=1,y=1;
    for(int i=1;i<=n;i++){
    	for(int j=1;j<=n;j++){
    		if(dp[i][j]>ans){
    			x=i;
    			y=j;
    			ans=dp[i][j];
    		}
    	}
    }
    cout<<x<<" "<<y<<endl;
    return 0;
  }


  using namespace std;

               #include <bits/stdc++.h>
                     #define ll long long
                     #define scanint1(a) scanf("%d",&a)
                     #define scanint2(a,b) scanf("%d %d",&a,&b)
                     #define scanint3(a,b,c) scanf("%d %d %d",&a,&b,&c)
                     #define scanint4(a,b,c,d) scanf("%d %d %d %d",&a,&b,&c,&d)
                     #define scanint5(a,b,c,d,e) scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
                     #define scanint6(a,b,c,d,e,f) scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)

                     #define scanlong1(a) scanf("%ld",&a)
                     #define scanlong2(a,b) scanf("%ld %ld",&a,&b)
                     #define scanlong3(a,b,c) scanf("%ld %ld %ld",&a,&b,&c)
                     #define scanlong4(a,b,c,d) scanf("%ld %ld %ld %ld",&a,&b,&c,&d)
                     #define scanlong5(a,b,c,d,e) scanf("%ld %ld %ld %ld %ld",&a,&b,&c,&d,&e)
                     #define scanll1(a) scanf("%lld",&a)
                     #define scanll2(a,b) scanf("%lld %lld",&a,&b)
                     #define scanll3(a,b,c) scanf("%lld %lld %lld",&a,&b,&c)
                     #define scanll4(a,b,c,d) scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
                     #define scanll5(a,b,c,d,e) scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)

                     #define read  freopen("input.txt","r",stdin);
                     #define write  freopen("output.txt","w",stdout);

                     //Convert from int to char (0 to 25 )--->(a to z) == (char)(int+97)
                     //Convert from char int to int char-48
                     //~ reflects 0 to 1 and 1 to 0 ; ex:: ~5 =-5
                     //tester.erase(std::remove(tester.begin(), tester.end(), '0'), tester.end());
                     //bool valid(int i, int j) { return i >= 0 && i < n && j >= 0 && j < m; }

                            using namespace std;

                                    int main()

                                    {
                                          int n,k;

                                       scanint2(n,k);

                                       char arr[n+5][n+5];

                                       map<pair<int,int>,int > mp;

                                       for(int i=1;i<=n;i++)
                                          for(int j=1;j<=n;j++)
                                              cin>>arr[i][j];

                                        for(int i=1;i<=n;i++)
                                        {
                                                for(int j=1;j<=n;j++)
                                            {

                                                    if(arr[i][j]=='*') continue;
                                                    bool left=0,right=0,up=0,down=0;

                                                    int counter=0;

                                                 for(int x=j;x<=n;x++)
                                                    if(counter==k){right=1; break; }
                                                    else if(arr[i][x]=='.') counter++;
                                                    else break;

                                                   if(right||counter==k)
                                                   {
                                                    counter=0;
                                                    for(int x=j;x<=n;x++)
                                                      if(counter==k){right=1; break; }
                                                      else if(arr[i][x]=='.') counter++,mp[{i,x}]++;
                                                      else break;

                                                   }

                                                  counter=0;
                                                  for(int x=j;x>0;x--)
                                                      if(counter==k){left=1; break; }
                                                    else if(arr[i][x]=='.') counter++;
                                                    else break;

                                                    if(left||counter==k)
                                                   {
                                                    counter=0;
                                                    for(int x=j;x>0;x--)
                                                      if(counter==k){left=1; break; }
                                                      else if(arr[i][x]=='.') counter++,mp[{i,x}]++;
                                                     else break;

                                                   }

                                                  counter=0;
                                                  for(int x=i;x<=n;x++)
                                                      if(counter==k){down=1; break; }
                                                    else if(arr[x][j]=='.') counter++;
                                                    else break;

                                                    if(down||counter==k)
                                                   {
                                                    counter=0;
                                                    for(int x=i;x<=n;x++)
                                                      if(counter==k){down=1; break; }
                                                    else if(arr[x][j]=='.') counter++,mp[{x,j}]++;
                                                    else break;

                                                   }

                                                  counter=0;
                                                  for(int x=i;x>0;x--)
                                                      if(counter==k){up=1; break; }
                                                    else if(arr[x][j]=='.') counter++;
                                                    else break;

                                                  if(up||counter==k)
                                                   {
                                                    counter=0;
                                                    for(int x=i;x>0;x--)
                                                      if(counter==k){up=1; break; }
                                                    else if(arr[x][j]=='.') counter++,mp[{x,j}]++;
                                                    else break;
                                                   }

                                            }

                                        }

                                       pair<int,int> pr;
                                       int number=-1;

                                       for(auto it=mp.begin();it!=mp.end();it++)
                                       {

                                            if(it->second>number)
                                            pr.first=it->first.first,pr.second=it->first.second,number=it->second;

                                       }

                                       if(!pr.first&&!pr.second){cout<<1<<" "<<1<<endl; return 0;}
                                    cout<<pr.first<<" "<<pr.second<<endl;

                                        return 0;

                                    }