#include <bits/stdc++.h>

using namespace std;
int a,b;

char ara[120][150];

int uptext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int downtext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int lefttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int righttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int main()
{
    cin>>a>>b;
    for(int i = 1 ; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {
            cin>>ara[i][j];

        }
    }

    int x=1;
    int y =1;
    int maxi=0;
    for(int i = 1; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {

            int tmp = 0;

            if(ara[i][j]=='.')
            {
                if(uptext(i,j)+downtext(i,j)-1 >=b){
                    tmp=tmp+uptext(i,j)+downtext(i,j)-1-b;
                }

                 if(lefttext(i,j)+righttext(i,j) -1  >=b){
                    tmp=tmp+lefttext(i,j)+righttext(i,j))-1-b;
                }

                if(tmp>=maxi)
                {
                    x = i;
                    y=j;
                    maxi=tmp;
                }
            }

        }
    }
    cout<<x<<" "<<y<<endl;
   // cout<<" "<<maxi<<endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int a,b;

char ara[120][150];

int uptext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int downtext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int lefttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int righttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int main()
{
    cin>>a>>b;
    for(int i = 1 ; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {
            cin>>ara[i][j];

        }
    }

    int x=1;
    int y =1;
    int maxi=0;
    for(int i = 1; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {

            int tmp = 0;

            if(ara[i][j]=='.')
            {
                if(uptext(i,j)+downtext(i,j)-1 >=b){
                    tmp=tmp+min(uptext(i,j),downtext(i,j));
                }

                 if(lefttext(i,j)+righttext(i,j) -1  >=b){
                    tmp=tmp+min(lefttext(i,j),righttext(i,j));
                }

                if(tmp>=maxi)
                {
                    x = i;
                    y=j;
                    maxi=tmp;
                }
            }

        }
    }
    cout<<x<<" "<<y<<endl;
   // cout<<" "<<maxi<<endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;
 int a,b;

  char ara[120][150];

int uptext(int i , int j ){
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i--){
        if(ara[i][j]=='.'){
            ans++;
            if(ans>=b){
                return 1;
            }
        }
        else {
            return  0;
        }
    }
        return 0;
}

int downtext(int i , int j ){
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i++){
        if(ara[i][j]=='.'){
            ans++;
            if(ans>=b){
                return 1;
            }
        }
        else {
            return  0;
        }
    }
        return 0;
}
int lefttext(int i , int j ){
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j--){
        if(ara[i][j]=='.'){
            ans++;
            if(ans>=b){
                return 1;
            }
        }
        else {
            return  0;
        }
    }
        return 0;
}
int righttext(int i , int j ){
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j++){
        if(ara[i][j]=='.'){
            ans++;
            if(ans>=b){
                return 1;
            }
        }
        else {
            return  0;
        }
    }
        return 0;
}

int main()
{
  cin>>a>>b;
  for(int i = 1 ; i<=a ; i++){
     for(int j = 1 ; j<=a ; j++){
            cin>>ara[i][j];

     }
  }

int x=1;
int y =1;
int maxi=0;
   for(int i = 1; i<=a ; i++){
     for(int j = 1 ; j<=a ; j++){

            int tmp = 0;

           if(ara[i][j]=='.'){
            tmp = uptext(i,j)+downtext(i,j)+lefttext(i,j)+righttext(i,j);
           if(tmp>=maxi){
            x = i;
            y=j;
            maxi=tmp;
           }
           }

     }
  }
  cout<<x<<" "<<y<<endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int a,b;

char ara[120][150];

int uptext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int downtext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int lefttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int righttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int main()
{
    cin>>a>>b;
    for(int i = 1 ; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {
            cin>>ara[i][j];

        }
    }

    int x=1;
    int y =1;
    int maxi=0;
    for(int i = 1; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {

            int tmp = 0;

            if(ara[i][j]=='.')
            {
                if(uptext(i,j)+downtext(i,j)-1 >=b){
                    tmp=tmp+uptext(i,j)+downtext(i,j)-1-b;
                }

                 if(lefttext(i,j)+righttext(i,j) -1  >=b){
                    tmp=tmp+lefttext(i,j)+righttext(i,j)-1-b;
                }

                if(tmp>=maxi)
                {
                    x = i;
                    y=j;
                    maxi=tmp;
                }
            }

        }
    }
    cout<<x<<" "<<y<<endl;
   // cout<<" "<<maxi<<endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int a,b;

char ara[120][150];

int uptext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int downtext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int lefttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int righttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int main()
{
    cin>>a>>b;
    for(int i = 1 ; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {
            cin>>ara[i][j];

        }
    }

    int x=1;
    int y =1;
    int maxi=0;
    for(int i = 1; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {

            int tmp = 0;

            if(ara[i][j]=='.')
            {
                if(uptext(i,j)+downtext(i,j) -1  >b){
                    tmp+=2;
                }
                else if(uptext(i,j) >= b ) tmp++;
                else  if(downtext(i,j) >= b) tmp++;

                 if(lefttext(i,j)+righttext(i,j) -1  >b){
                    tmp+=2;
                }
                else if(lefttext(i,j) >= b ) tmp++;
                else  if(righttext(i,j) >= b) tmp++;

                if(tmp>=maxi)
                {
                    x = i;
                    y=j;
                    maxi=tmp;
                }
            }

        }
    }
    cout<<x<<" "<<y<<endl;
   // cout<<" "<<maxi<<endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int a,b;

char ara[120][150];

int uptext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int downtext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; i++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int lefttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j--)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}
int righttext(int i, int j )
{
    int ans=0;
    for( ; ara[i][j]!='#' && a>=i && a>=j  ; j++)
    {
        if(ara[i][j]=='.')
        {
            ans++;
            if(ans>=b)
            {
                return ans;
            }
        }
        else
        {
            return  ans;
        }
    }
    return ans;
}

int main()
{
    cin>>a>>b;
    for(int i = 1 ; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {
            cin>>ara[i][j];

        }
    }

    int x=1;
    int y =1;
    int maxi=0;
    for(int i = 1; i<=a ; i++)
    {
        for(int j = 1 ; j<=a ; j++)
        {

            int tmp = 0;

            if(ara[i][j]=='.')
            {
                if(uptext(i,j)+downtext(i,j)-1 >=b){
                    tmp=tmp+uptext(i,j)+downtext(i,j)-b;
                }

                 if(lefttext(i,j)+righttext(i,j) -1  >=b){
                    tmp=tmp+lefttext(i,j)+righttext(i,j)-b;
                }

                if(tmp>=maxi)
                {
                    x = i;
                    y=j;
                    maxi=tmp;
                }
            }

        }
    }
    cout<<x<<" "<<y<<endl;
   // cout<<" "<<maxi<<endl;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int n,k,cnt,loc,x,y,Max;
char Map[105][105];
int dp[105][105];
char c;
int main()
{
    int dx,dy,up,down,left,right,ans;
    scanf("%d%d",&n,&k);
    scanf("%c",&c);
    x = y = 1;
    for (int i = 1;i <= n;i++)
    {
        for (int j = 1;j <= n;j++)
            scanf("%c",&Map[i][j]);
        scanf("%c",&c);
    }
    for(int i = 1;i <= n;i++)
    {
        for (int j = 1;j <= n;j++)
        {
            if (Map[i][j] == '.')
            {
                dx = i;dy = j;ans = 0;
                while(Map[dx][dy]=='.'&&dx>=1) dx--;
                up = i-dx;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dy>=1) dy--;
                left = j-dy;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dx<=n) dx++;
                down = dx-i;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dy<=n) dy++;
                right = dy-j;

                if (up>=k&&down>=k)
                    ans+=k;
                else if(up>=k&&down<k)
                    ans+=down;
                else if(up<k&&down>=k)
                    ans+=up;
                else
                    ans=ans+(up+down)-k;

                if (left>=k&&right>=k)
                    ans+=k;
                else if(left>=k&&right<k)
                    ans+=right;
                else if(left<k&&right>=k)
                    ans+=left;
                else
                    ans=ans+(right+left)-k;

                dp[i][j] = ans;
            }
        }
    }
    for(int i = 1;i <= n;i++)
    {
        for(int j = 1;j <= n;j++)
        {
            if (dp[i][j] > Max)
            {
                Max = dp[i][j];
                x = i;
                y = j;
            }
        }
    }
    printf("%d %d\n",x,y);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int n,k,cnt,loc,x,y,Max;
char Map[105][105];
int dp[105][105];
char c;
int main()
{
    int dx,dy,up,down,left,right,ans;
    scanf("%d%d",&n,&k);
    scanf("%c",&c);
    x = y = 1;
    for (int i = 1;i <= n;i++)
    {
        for (int j = 1;j <= n;j++)
            scanf("%c",&Map[i][j]);
        scanf("%c",&c);
    }
    for(int i = 1;i <= n;i++)
    {
        for (int j = 1;j <= n;j++)
        {
            if (Map[i][j] == '.')
            {
                dx = i;dy = j;ans = 0;
                while(Map[dx][dy]=='.'&&dx>=1) dx--;
                up = i-dx;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dy>=1) dy--;
                left = j-dy;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dx<=n) dx++;
                down = dx-i;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dy<=n) dy++;
                right = dy-j;

                if (up>=k&&down>=k)
                    ans+=k;
                if(up>=k&&down<k)
                    ans+=down;
                if(up<k&&down>=k)
                    ans+=up;
                if(up<k&&down<k&&(up+down)>=k)
                    ans=ans+(up+down)-k;

                if (left>=k&&right>=k)
                    ans+=k;
                if(left>=k&&right<k)
                    ans+=right;
                if(left<k&&right>=k)
                    ans+=left;
                if(left<k&&right<k&&(left+right)>=k)
                    ans=ans+(right+left)-k;

                dp[i][j] = ans;
                //cout << "i:" << i<<"  j:"<<j<<" ="<<ans<<endl;
            }
        }
    }
    for(int i = 1;i <= n;i++)
    {
        for(int j = 1;j <= n;j++)
        {
            if (dp[i][j] > Max)
            {
                Max = dp[i][j];
                x = i;
                y = j;
            }
        }
    }
    printf("%d %d\n",x,y);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int n,k,cnt,loc,x,y,Max;
char Map[105][105];
int dp[105][105];
char c;
int main()
{
    int dx,dy,up,down,left,right,ans;
    scanf("%d%d",&n,&k);
    scanf("%c",&c);
    x = y = 1;
    for (int i = 1;i <= n;i++)
    {
        for (int j = 1;j <= n;j++)
            scanf("%c",&Map[i][j]);
        scanf("%c",&c);
    }
    for(int i = 1;i <= n;i++)
    {
        for (int j = 1;j <= n;j++)
        {
            if (Map[i][j] == '.')
            {
                dx = i;dy = j;ans = 0;
                while(Map[dx][dy]=='.'&&dx>=1) dx--;
                up = i-dx;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dy>=1) dy--;
                left = j-dy;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dx<=n) dx++;
                down = dx-i;

                dx = i;dy = j;
                while(Map[dx][dy]=='.'&&dy<=n) dy++;
                right = dy-j;

                if(up >= k) ans++;
                if(down >= k) ans++;
                if(right >= k) ans++;
                if(left >= k) ans++;
                dp[i][j] = ans;
            }
        }
    }
    for(int i = 1;i <= n;i++)
    {
        for(int j = 1;j <= n;j++)
        {
            if (dp[i][j] == 4)
            {
                printf("%d %d\n",i,j);
                return 0;
            }
            if (dp[i][j] > Max)
            {
                Max = dp[i][j];
                x = i;
                y = j;
            }
        }
    }
    printf("%d %d\n",x,y);

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	/*
	char** area = new char*[n];
	for(int i = 0; i < n; ++i)
		area[i] = new char[n];

	char** area2 = new char*[n];
	for(int i = 0; i < n; ++i)
		area2[i] = new char[n];

	int** posib = new int*[n];
	for(int i = 0; i < n; ++i)
		posib[i] = new int[n];

	int** posib2 = new int*[n];
	for(int i = 0; i < n; ++i)
		posib2[i] = new int[n];
	*/
	/*
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	*/
	char area[105][105];
	char area2[105][105];
	int posib[105][105];
	int posib2[105][105];
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	/*
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	* */
	/*
	for(int i = 0; i < n; ++i)
		delete[] area[i];
	delete[] area;

	for(int i = 0; i < n; ++i)
			delete area2[i];
	delete[] area2;

	for(int i = 0; i < n; ++i)
		delete[] posib[i] ;
	delete[] posib;

	for(int i = 0; i < n; ++i)
		delete[] posib2[i];
	delete[] posib2;
	*/
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char** area = new char*[n];
	for(int i = 0; i < n; ++i)
		area[i] = new char[n];

	char** area2 = new char*[n];
	for(int i = 0; i < n; ++i)
		area2[i] = new char[n];

	int** posib = new int*[n];
	for(int i = 0; i < n; ++i)
		posib[i] = new int[n];

	int** posib2 = new int*[n];
	for(int i = 0; i < n; ++i)
		posib2[i] = new int[n];
	/*
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	*/
	//char area[n][n];
	//char area2[n][n];
	//int posib[n][n];
	//int posib2[n][n];
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	/*
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	* */
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	cout<<maxy+1<<" "<<maxx+1;

	return 0;
}


#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	/*
	char** area = new char*[n];
	for(int i = 0; i < n; ++i)
		area[i] = new char[n];

	char** area2 = new char*[n];
	for(int i = 0; i < n; ++i)
		area2[i] = new char[n];

	int** posib = new int*[n];
	for(int i = 0; i < n; ++i)
		posib[i] = new int[n];

	int** posib2 = new int*[n];
	for(int i = 0; i < n; ++i)
		posib2[i] = new int[n];
	*/
	/*
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	*/
	char area[105][105]={0};
	char area2[105][105]={0};
	int posib[105][105]={0};
	int posib2[105][105]={0};
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)//b = 1 2
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==bas+(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==bas+(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==bas+(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==bas+(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	*/
	//cout<<yerler2.size()<<endl;
	/*
	cout<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	cout<<endl;
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[j][i]<<" ";
		}
		cout<<"\n";
	}
	* */
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	/*
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	* */
	/*
	for(int i = 0; i < n; ++i)
		delete[] area[i];
	delete[] area;

	for(int i = 0; i < n; ++i)
			delete area2[i];
	delete[] area2;

	for(int i = 0; i < n; ++i)
		delete[] posib[i] ;
	delete[] posib;

	for(int i = 0; i < n; ++i)
		delete[] posib2[i];
	delete[] posib2;
	*/
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;

	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}

	//char area[n][n];
	//char area2[n][n];
	//int posib[n][n];
	//int posib2[n][n];
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	/*
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	* */
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char** area = new char*[n];
	for(int i = 0; i < n; ++i)
		area[i] = new char[n];

	char** area2 = new char*[n];
	for(int i = 0; i < n; ++i)
		area2[i] = new char[n];

	int** posib = new int*[n];
	for(int i = 0; i < n; ++i)
		posib[i] = new int[n];

	int** posib2 = new int*[n];
	for(int i = 0; i < n; ++i)
		posib2[i] = new int[n];
	/*
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	*/
	//char area[n][n];
	//char area2[n][n];
	//int posib[n][n];
	//int posib2[n][n];
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	/*
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	* */

	for(int i = 0; i < n; ++i)
		delete[] area[i];
	delete[] area;

	for(int i = 0; i < n; ++i)
			delete area2[i];
	delete[] area2;

	for(int i = 0; i < n; ++i)
		delete[] posib[i] ;
	delete[] posib;

	for(int i = 0; i < n; ++i)
		delete[] posib2[i];
	delete[] posib2;
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	cout<<maxy+1<<" "<<maxx+1<<"\n";

	return 0;
}


#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	/*
	char** area = new char*[n];
	for(int i = 0; i < n; ++i)
		area[i] = new char[n];

	char** area2 = new char*[n];
	for(int i = 0; i < n; ++i)
		area2[i] = new char[n];

	int** posib = new int*[n];
	for(int i = 0; i < n; ++i)
		posib[i] = new int[n];

	int** posib2 = new int*[n];
	for(int i = 0; i < n; ++i)
		posib2[i] = new int[n];
	*/
	/*
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	*/
	char area[105][105]={0};
	char area2[105][105]={0};
	int posib[105][105]={0};
	int posib2[105][105]={0};
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	/*
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	free(area);
	free(area2);
	free(posib);
	free(posib2);
	* */
	/*
	for(int i = 0; i < n; ++i)
		delete[] area[i];
	delete[] area;

	for(int i = 0; i < n; ++i)
			delete area2[i];
	delete[] area2;

	for(int i = 0; i < n; ++i)
		delete[] posib[i] ;
	delete[] posib;

	for(int i = 0; i < n; ++i)
		delete[] posib2[i];
	delete[] posib2;
	*/
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct bosluk
{
	int line;
	int bas;
	int son;
};
int main()
{
	int n,k;
	cin>>n>>k;
	char **area=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area[i]=(char*)malloc(sizeof(char)*n);
	}
	char **area2=(char **)malloc(sizeof(char*)*n);
	for(int i=0;i<n;i++)
	{
		area2[i]=(char*)malloc(sizeof(char)*n);
	}
	int **posib=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib[i]=(int*)malloc(sizeof(int)*n);
	}
	int **posib2=(int **)malloc(sizeof(int*)*n);
	for(int i=0;i<n;i++)
	{
		posib2[i]=(int*)malloc(sizeof(int)*n);
	}
	char c;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cin>>c;
			area[i][j]=c;
		}

	}
	//cout<<area[0][0];
	vector<bosluk> yerler;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler.size();i++)
	{
		int bas=yerler[i].bas;
		int son=yerler[i].son;
		int line=yerler[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib[line][son-(b-bas)]+=x;

				}
			}
		}
	}
	/*
	cout<<endl;
	for(int i=0;i<yerler.size();i++)
	{
		cout<<yerler[i].bas<<" "<<yerler[i].son<<"\n";
	}
	cout<<endl<<endl;
	for(int i=0;i<n;i++)

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

	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			posib2[i][j]=posib[j][i];
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			area2[i][j]=area[j][i];
		}
	}
	vector<bosluk> yerler2;

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area2[i][j]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=i;
					yer.bas=j;
					yer.son=j;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=j;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}

	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;

			for(int b=bas;b<=bas+(son-bas)/2;b++)
			{

				int maxx=0;
				maxx=min(k,son-bas+1-k+1);
				if(x<maxx)
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;
					x++;
				}
				else
				{
					posib2[line][b]+=x;
					if(!((son-bas+1)%2==1&&b==(son-bas)/2))
						posib2[line][son-(b-bas)]+=x;

				}
			}
		}
	}
/*
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib2[i][j]<<" ";
		}
		cout<<"\n";
	}
		for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			cout<<posib[i][j]<<" ";
		}
		cout<<"\n";
	}
	*/
	/*

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

		bool newdot=true;
		for(int j =0; j<n;j++)
		{
			//cout<<"tt"<<area[i][j]<<"tt";
			if(area[j][i]=='.')
			{
				//cout<<newdot;
				if(newdot)
				{
					//cout<<"test\n";
					yer_sayisi++;
					bosluk yer;
					yer.line=j;
					yer.bas=i;
					yer.son=i;
					yerler2.push_back(yer);
					newdot=false;
				}
				else
				{
					yerler2[yer_sayisi-1].son=i;
				}
			}
			else
			{
				newdot=true;
			}
		}
	}
	cout<<yerler2.size()<<endl;
	for(int i=0;i<yerler2.size();i++)
	{
		cout<<yerler2[i].bas<<" "<<yerler2[i].son<<"\n" ;
	}
	for(int i=0;i<yerler2.size();i++)
	{
		int bas=yerler2[i].bas;
		int son=yerler2[i].son;
		int line=yerler2[i].line;
		if(son-bas+1>=k)
		{
			int x=1;
			int sayac=0;
			for(int b=bas;b<=bas+(son-bas)/2;b++,sayac++)
			{
				if(x<k)
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;
					x++;
				}
				else
				{
					posib[b][line]+=x;
					posib[son-sayac][line]+=x;

				}
			}
		}
	}
	*/
	int maxx=0;
	int maxy=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(posib2[maxx][maxy]<posib2[i][j])
			{
				maxx=i;
				maxy=j;
			}
		}
	}
	//cout<<maxy+1<<" "<<maxx+1;
	for(int i=0;i<n;i++)
	{
		free(area[i]);
		free(area2[i]);
		free(posib[i]);
		free(posib2[i]);
	}
	printf("%d %d",maxy+1,maxx+1);
	return 0;
}


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

typedef long long ll;
typedef unsigned long long int llu;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define mem(a, v) memset(a, v, sizeof(a))
#define PI acos(-1)
#define S(a) scanf("%d",&a)
#define SL(a) scanf("%lld",&a)
#define S2(a, b) scanf("%d%d",&a,&b)
#define nl printf("\n")
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define deb2(x, y) cout<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<endl;
#define debv(x) {cout<<#x<<" : "<<endl; for(int ii =0; ii < x.size(); ii++) cout<<x[ii]<<" "; cout<<endl; }
#define debarr(x, xs) {cout<<#x<<" : "<<endl; for(int ii =0; ii < xs; ii++) cout<<x[ii]<<" "; cout<<endl; }
const ll mod = 1000000007LL;
const int lmt = 1000005;

bool isValid(double x) {
    ll _x = floor(x);
    if((x - _x) == 0)
        return true;
    else
        return false;
}

ll solve(ll c) {
    double A = 1.0, B = -1.0, C = -1.0*2.0*c;
    double D = (B*B) - (4*A*C);
    if(D < 0)
        return -1;
    D = sqrtl(D);
    double X = ((-1.0*B) + D)/(2.0*A);
    double Y = ((-1.0*B) - D)/(2.0*A);
    if(isValid(X))
        return floor(X);
    else if(isValid(Y))
        return floor(Y);
    else
        return -1;
}

vector<pair<ll, ll> > pro;

void fact(ll n1, ll n0, ll n10, ll n01) {
    while(n10 > 0) {
        if(n10 >= n1) {
            ll x = n10 / n1;
            pro.pb(mp(n1, x));
            n10 = n10 % n1;
        }
        else
            n1 = n10;
    }

}

void print(ll n1, ll n0, ll n10, ll n01) {
    string s = "";
    ll cnt1 = 0, cnt0 = 0;
    for(int i = 0; i < pro.size() - 1; i++) {
        for(int j = 0; j < pro[i].Y; j++){
            s = '0' + s;
            cnt0++;
        }
        for(int j = 0; j < (pro[i].X - pro[i+1].X); j++){
            s = '1' + s;
            cnt1++;
        }
    }
    for(int i = 0; i < pro[pro.size() - 1].Y; i++){
        s = '0' + s;
        cnt0++;
    }
    for(int i = 0; i < pro[pro.size() - 1].X; i++){
        s = '1' + s;
        cnt1++;
    }
    for(int i = 0; i < (n0 - cnt0); i++)
        s = '0' + s;
    for(int i = 0; i < (n1 - cnt1); i++)
        s = '1' + s;
    cout<<s;nl;
}

int main(){
    ll n00, n01, n10, n11;
    scanf("%lld%lld%lld%lld",&n00,&n01,&n10,&n11);
    ll n0 = solve(n00);
    ll n1 = solve(n11);
    if((n0 == -1) || (n1 == -1)) {
        printf("Impossible\n");
        return 0;
    }
    if((n01 > 0) && (n10 > 0) && ((n0*n1) != (n01 + n10))) {
        printf("Impossible\n");
        return 0;
    }

    // ek special case bacha hai
    if((n01 == 0) && (n10 == 0)) {
        if(n0 == 1) {
            string s = "";
            for(int i = 0; i < n1; i++)
                s = '1' + s;
            cout<<s;nl;
            return 0;
        }
        else {
            string s = "";
            for(int i = 0; i < n1; i++)
                s = '0' + s;
            cout<<s;nl;
            return 0;
        }
    }
    if(n11 == 0) {
        string s = "";
        for(int i = 0; i < n01; i++)
            s = s + '0';
        s = s + '1';
        for(int i = 0; i < n10; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }
    if(n00 == 0) {
        string s = "";
        for(int i = 0; i < n10; i++)
            s = s + '1';
        s = s + '0';
        for(int i = 0; i < n01; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }

    fact(n1, n0, n10, n01);
    print(n1, n0, n10, n01);
    return 0;
}


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

typedef long long ll;
typedef unsigned long long int llu;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define mem(a, v) memset(a, v, sizeof(a))
#define PI acos(-1)
#define S(a) scanf("%d",&a)
#define SL(a) scanf("%lld",&a)
#define S2(a, b) scanf("%d%d",&a,&b)
#define nl printf("\n")
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define deb2(x, y) cout<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<endl;
#define debv(x) {cout<<#x<<" : "<<endl; for(int ii =0; ii < x.size(); ii++) cout<<x[ii]<<" "; cout<<endl; }
#define debarr(x, xs) {cout<<#x<<" : "<<endl; for(int ii =0; ii < xs; ii++) cout<<x[ii]<<" "; cout<<endl; }
const ll mod = 1000000007LL;
const int lmt = 1000005;

bool isValid(double x) {
    ll _x = floor(x);
    if((x - _x) == 0)
        return true;
    else
        return false;
}

ll solve(ll c) {
    double A = 1.0, B = -1.0, C = -1.0*2.0*c;
    double D = (B*B) - (4*A*C);
    if(D < 0)
        return -1;
    D = sqrtl(D);
    double X = ((-1.0*B) + D)/(2.0*A);
    double Y = ((-1.0*B) - D)/(2.0*A);
    if(isValid(X))
        return floor(X);
    else if(isValid(Y))
        return floor(Y);
    else
        return -1;
}

vector<pair<ll, ll> > pro;

void fact(ll n1, ll n0, ll n10, ll n01) {
    while(n10 > 0) {
        if(n10 >= n1) {
            ll x = n10 / n1;
            pro.pb(mp(n1, x));
            n10 = n10 % n1;
        }
        else
            n1 = n10;
    }

}

void print(ll n1, ll n0, ll n10, ll n01) {
    string s = "";
    ll cnt1 = 0, cnt0 = 0;
    for(int i = 0; i < pro.size() - 1; i++) {
        for(int j = 0; j < pro[i].Y; j++){
            s = '0' + s;
            cnt0++;
        }
        for(int j = 0; j < (pro[i].X - pro[i+1].X); j++){
            s = '1' + s;
            cnt1++;
        }
    }
    for(int i = 0; i < pro[pro.size() - 1].Y; i++){
        s = '0' + s;
        cnt0++;
    }
    for(int i = 0; i < pro[pro.size() - 1].X; i++){
        s = '1' + s;
        cnt1++;
    }
    for(int i = 0; i < (n0 - cnt0); i++)
        s = '0' + s;
    for(int i = 0; i < (n1 - cnt1); i++)
        s = '1' + s;
    cout<<s;nl;
}

int main(){
    ll n00, n01, n10, n11;
    scanf("%lld%lld%lld%lld",&n00,&n01,&n10,&n11);
    ll n0 = solve(n00);
    ll n1 = solve(n11);
    if((n0 == -1) || (n1 == -1)) {
        printf("Impossible\n");
        return 0;
    }
    if((n01 > 0) && (n10 > 0) && ((n0*n1) != (n01 + n10))) {
        printf("Impossible\n");
        return 0;
    }
    // ek special case bacha hai
    // yahi wala bacha tha. BC
    if((n01 == 0) && (n10 == 0)) {
        if(n0 == 1) {
            string s = "";
            for(int i = 0; i < n1; i++)
                s = '1' + s;
            cout<<s;nl;
            return 0;
        }
        else {
            string s = "";
            for(int i = 0; i < n0; i++)
                s = '0' + s;
            cout<<s;nl;
            return 0;
        }
    }
    if(n11 == 0) {
        string s = "";
        for(int i = 0; i < n01; i++)
            s = s + '0';
        s = s + '1';
        for(int i = 0; i < n10; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }
    if(n00 == 0) {
        string s = "";
        for(int i = 0; i < n10; i++)
            s = s + '1';
        s = s + '0';
        for(int i = 0; i < n01; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }

    fact(n1, n0, n10, n01);
    print(n1, n0, n10, n01);
    return 0;
}


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

typedef long long ll;
typedef unsigned long long int llu;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define mem(a, v) memset(a, v, sizeof(a))
#define PI acos(-1)
#define S(a) scanf("%d",&a)
#define SL(a) scanf("%lld",&a)
#define S2(a, b) scanf("%d%d",&a,&b)
#define nl printf("\n")
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define deb2(x, y) cout<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<endl;
#define debv(x) {cout<<#x<<" : "<<endl; for(int ii =0; ii < x.size(); ii++) cout<<x[ii]<<" "; cout<<endl; }
#define debarr(x, xs) {cout<<#x<<" : "<<endl; for(int ii =0; ii < xs; ii++) cout<<x[ii]<<" "; cout<<endl; }
const ll mod = 1000000007LL;
const int lmt = 1000005;

bool isValid(double x) {
    ll _x = floor(x);
    if((x - _x) == 0)
        return true;
    else
        return false;
}

ll solve(ll c) {
    double A = 1.0, B = -1.0, C = -1.0*2.0*c;
    double D = (B*B) - (4*A*C);
    if(D < 0)
        return -1;
    D = sqrtl(D);
    double X = ((-1.0*B) + D)/(2.0*A);
    double Y = ((-1.0*B) - D)/(2.0*A);
    if(isValid(X))
        return floor(X);
    else if(isValid(Y))
        return floor(Y);
    else
        return -1;
}

vector<pair<ll, ll> > pro;

void fact(ll n1, ll n0, ll n10, ll n01) {
    while(n10 > 0) {
        if(n10 >= n1) {
            ll x = n10 / n1;
            pro.pb(mp(n1, x));
            n10 = n10 % n1;
        }
        else
            n1 = n10;
    }
}

void print(ll n1, ll n0, ll n10, ll n01) {
    string s = "";
    ll cnt1 = 0, cnt0 = 0;
    for(int i = 0; i < pro.size() - 1; i++) {
        for(int j = 0; j < pro[i].Y; j++){
            s = '0' + s;
            cnt0++;
        }
        for(int j = 0; j < (pro[i].X - pro[i+1].X); j++){
            s = '1' + s;
            cnt1++;
        }
    }
    for(int i = 0; i < pro[pro.size() - 1].Y; i++){
        s = '0' + s;
        cnt0++;
    }
    for(int i = 0; i < pro[pro.size() - 1].X; i++){
        s = '1' + s;
        cnt1++;
    }
    for(int i = 0; i < (n0 - cnt0); i++)
        s = '0' + s;
    for(int i = 0; i < (n1 - cnt1); i++)
        s = '1' + s;
    cout<<s;nl;
}

int main(){
    ll n00, n01, n10, n11;
    scanf("%lld%lld%lld%lld",&n00,&n01,&n10,&n11);
    ll n0 = solve(n00);
    ll n1 = solve(n11);
    if((n0 == -1) || (n1 == -1)) {
        printf("Impossible\n");
        return 0;
    }
    if(((n01 > 0) || (n10 > 0)) && ((n0*n1) != (n01 + n10))) {
        printf("Impossible\n");
        return 0;
    }
    // ek special case bacha hai
    // yahi wala bacha tha. BC
    if((n01 == 0) && (n10 == 0)) {
        if(n0 == 1) {
            string s = "";
            for(int i = 0; i < n1; i++)
                s = '1' + s;
            cout<<s;nl;
            return 0;
        }
        else if(n1 == 1){
            string s = "";
            for(int i = 0; i < n0; i++)
                s = '0' + s;
            cout<<s;nl;
            return 0;
        }
        else {
            printf("Impossible\n");
            return 0;
        }
    }
    if(n11 == 0) {
        string s = "";
        for(int i = 0; i < n01; i++)
            s = s + '0';
        s = s + '1';
        for(int i = 0; i < n10; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }
    if(n00 == 0) {
        string s = "";
        for(int i = 0; i < n10; i++)
            s = s + '1';
        s = s + '0';
        for(int i = 0; i < n01; i++)
            s = s + '1';
        cout<<s;nl;
        return 0;
    }

    fact(n1, n0, n10, n01);
    print(n1, n0, n10, n01);
    return 0;
}


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

typedef long long ll;
typedef unsigned long long int llu;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define mem(a, v) memset(a, v, sizeof(a))
#define PI acos(-1)
#define S(a) scanf("%d",&a)
#define SL(a) scanf("%lld",&a)
#define S2(a, b) scanf("%d%d",&a,&b)
#define nl printf("\n")
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define deb2(x, y) cout<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<endl;
#define debv(x) {cout<<#x<<" : "<<endl; for(int ii =0; ii < x.size(); ii++) cout<<x[ii]<<" "; cout<<endl; }
#define debarr(x, xs) {cout<<#x<<" : "<<endl; for(int ii =0; ii < xs; ii++) cout<<x[ii]<<" "; cout<<endl; }
const ll mod = 1000000007LL;
const int lmt = 1000005;

bool isValid(double x) {
    ll _x = floor(x);
    if((x - _x) == 0)
        return true;
    else
        return false;
}

ll solve(ll c) {
    double A = 1.0, B = -1.0, C = -1.0*2.0*c;
    double D = (B*B) - (4*A*C);
    if(D < 0)
        return -1;
    D = sqrtl(D);
    double X = ((-1.0*B) + D)/(2.0*A);
    double Y = ((-1.0*B) - D)/(2.0*A);
    if(isValid(X))
        return floor(X);
    else if(isValid(Y))
        return floor(Y);
    else
        return -1;
}

vector<pair<ll, ll> > pro;

void fact(ll n1, ll n0, ll n10, ll n01) {
    while(n10 > 0) {
        if(n10 >= n1) {
            ll x = n10 / n1;
            pro.pb(mp(n1, x));
            n10 = n10 % n1;
        }
        else
            n1 = n10;
    }

}

void print(ll n1, ll n0, ll n10, ll n01) {
    string s = "";
    ll cnt1 = 0, cnt0 = 0;
    for(int i = 0; i < pro.size() - 1; i++) {
        for(int j = 0; j < pro[i].Y; j++){
            s = '0' + s;
            cnt0++;
        }
        for(int j = 0; j < (pro[i].X - pro[i+1].X); j++){
            s = '1' + s;
            cnt1++;
        }
    }
    for(int i = 0; i < pro[pro.size() - 1].Y; i++){
        s = '0' + s;
        cnt0++;
    }
    for(int i = 0; i < pro[pro.size() - 1].X; i++){
        s = '1' + s;
        cnt1++;
    }
    for(int i = 0; i < (n0 - cnt0); i++)
        s = '0' + s;
    for(int i = 0; i < (n1 - cnt1); i++)
        s = '1' + s;
    cout<<s;nl;
}

int main(){
    ll n00, n01, n10, n11;
    scanf("%lld%lld%lld%lld",&n00,&n01,&n10,&n11);
    ll n0 = solve(n00);
    ll n1 = solve(n11);
    if((n0 == -1) || (n1 == -1)) {
        printf("Impossible\n");
        return 0;
    }
    if((n01 > 0) && (n10 > 0) && ((n0*n1) != (n01 + n10))) {
        printf("Impossible\n");
        return 0;
    }
    // ek special case bacha hai
    // yahi wala bacha tha. BC
    if((n01 == 0) && (n10 == 0)) {
        if(n0 == 1) {
            string s = "";
            for(int i = 0; i < n1; i++)
                s = '1' + s;
            cout<<s;nl;
            return 0;
        }
        else {
            string s = "";
            for(int i = 0; i < n0; i++)
                s = '0' + s;
            cout<<s;nl;
            return 0;
        }
    }
    if(n11 == 0) {
        string s = "";
        for(int i = 0; i < n01; i++)
            s = s + '0';
        s = s + '1';
        for(int i = 0; i < n10; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }
    if(n00 == 0) {
        string s = "";
        for(int i = 0; i < n10; i++)
            s = s + '1';
        s = s + '0';
        for(int i = 0; i < n01; i++)
            s = s + '1';
        cout<<s;nl;
        return 0;
    }

    fact(n1, n0, n10, n01);
    print(n1, n0, n10, n01);
    return 0;
}


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

typedef long long ll;
typedef unsigned long long int llu;
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define mem(a, v) memset(a, v, sizeof(a))
#define PI acos(-1)
#define S(a) scanf("%d",&a)
#define SL(a) scanf("%lld",&a)
#define S2(a, b) scanf("%d%d",&a,&b)
#define nl printf("\n")
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define deb2(x, y) cout<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<endl;
#define debv(x) {cout<<#x<<" : "<<endl; for(int ii =0; ii < x.size(); ii++) cout<<x[ii]<<" "; cout<<endl; }
#define debarr(x, xs) {cout<<#x<<" : "<<endl; for(int ii =0; ii < xs; ii++) cout<<x[ii]<<" "; cout<<endl; }
const ll mod = 1000000007LL;
const int lmt = 1000005;

bool isValid(double x) {
    ll _x = floor(x);
    if((x - _x) == 0)
        return true;
    else
        return false;
}

ll solve(ll c) {
    double A = 1.0, B = -1.0, C = -1.0*2.0*c;
    double D = (B*B) - (4*A*C);
    if(D < 0)
        return -1;
    D = sqrtl(D);
    double X = ((-1.0*B) + D)/(2.0*A);
    double Y = ((-1.0*B) - D)/(2.0*A);
    if(isValid(X))
        return floor(X);
    else if(isValid(Y))
        return floor(Y);
    else
        return -1;
}

vector<pair<ll, ll> > pro;

void fact(ll n1, ll n0, ll n10, ll n01) {
    while(n10 > 0) {
        if(n10 >= n1) {
            ll x = n10 / n1;
            pro.pb(mp(n1, x));
            n10 = n10 % n1;
        }
        else
            n1 = n10;
    }
}

void print(ll n1, ll n0, ll n10, ll n01) {
    string s = "";
    ll cnt1 = 0, cnt0 = 0;
    for(int i = 0; i < pro.size() - 1; i++) {
        for(int j = 0; j < pro[i].Y; j++){
            s = '0' + s;
            cnt0++;
        }
        for(int j = 0; j < (pro[i].X - pro[i+1].X); j++){
            s = '1' + s;
            cnt1++;
        }
    }
    for(int i = 0; i < pro[pro.size() - 1].Y; i++){
        s = '0' + s;
        cnt0++;
    }
    for(int i = 0; i < pro[pro.size() - 1].X; i++){
        s = '1' + s;
        cnt1++;
    }
    for(int i = 0; i < (n0 - cnt0); i++)
        s = '0' + s;
    for(int i = 0; i < (n1 - cnt1); i++)
        s = '1' + s;
    cout<<s;nl;
}

int main(){
    ll n00, n01, n10, n11;
    scanf("%lld%lld%lld%lld",&n00,&n01,&n10,&n11);
    ll n0 = solve(n00);
    ll n1 = solve(n11);
    if((n0 == -1) || (n1 == -1)) {
        printf("Impossible\n");
        return 0;
    }
    if((n01 > 0) && (n10 > 0) && ((n0*n1) != (n01 + n10))) {
        printf("Impossible\n");
        return 0;
    }
    // ek special case bacha hai
    // yahi wala bacha tha. BC
    if((n01 == 0) && (n10 == 0)) {
        if(n0 == 1) {
            string s = "";
            for(int i = 0; i < n1; i++)
                s = '1' + s;
            cout<<s;nl;
            return 0;
        }
        else if(n1 == 0){
            string s = "";
            for(int i = 0; i < n0; i++)
                s = '0' + s;
            cout<<s;nl;
            return 0;
        }
        else {
            printf("Impossible\n");
            return 0;
        }
    }
    if(n11 == 0) {
        string s = "";
        for(int i = 0; i < n01; i++)
            s = s + '0';
        s = s + '1';
        for(int i = 0; i < n10; i++)
            s = s + '0';
        cout<<s;nl;
        return 0;
    }
    if(n00 == 0) {
        string s = "";
        for(int i = 0; i < n10; i++)
            s = s + '1';
        s = s + '0';
        for(int i = 0; i < n01; i++)
            s = s + '1';
        cout<<s;nl;
        return 0;
    }

    fact(n1, n0, n10, n01);
    print(n1, n0, n10, n01);
    return 0;
}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;
	if(a==0 && b==0 && c==0 && d==0){
		cout << "0" << endl;
		return 0;
	}
	one = sqrt(d*2) ;
	if((one*(one+1)) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if((zero*(zero+1)) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1){
		cout << "Impossible" << endl;
		//cout << "here" << endl;
		assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}

	LL zero_till =0 ,one_till = 0;
	LL zero_zero =0 , zero_one = 0 , one_zero =0 , one_one =0 ;
	for(i=0;i<one+zero;i++){
		if(ans[i] == '0'){
			zero_till ++ ;
			zero_zero += zero_till-1 ;
			one_zero += one_till ;
		}
		else if(ans[i]=='1'){
			one_till++;
			one_one += one_till-1 ;
			zero_one += zero_till ;
		}
		else assert(1==0);
	}
	if(one_one!=d || zero_one!=b || one_zero!=c || zero_zero!=a){
		cout << "Impossible" << endl;
		return 0;
	}
	if(!ans.size()){
		cout << "Impossible" << endl;
		return 0;
	}

	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		return 0;
	}
	else flag=1 , cout << ans << endl ;
	assert(ans.size()<=1000000);

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;
	if(a==0 && b==0 && c==0 && d==0){
		cout << "Impossible" << endl;
		return 0;
	}
	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1){
		cout << "Impossible" << endl;
		assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}

	LL zero_till =0 ,one_till = 0;
	LL zero_zero =0 , zero_one = 0 , one_zero =0 , one_one =0 ;
	for(i=0;i<one+zero;i++){
		if(ans[i] == '0'){
			zero_till ++ ;
			zero_zero += zero_till-1 ;
			one_zero += one_till ;
		}
		else if(ans[i]=='1'){
			one_till++;
			one_one += one_till-1 ;
			zero_one += zero_till ;
		}
		else assert(1==0);
	}
	if(one_one!=d || zero_one!=b || one_zero!=c || zero_zero!=a){
		cout << "Impossible" << endl;
		return 0;
	}

	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		return 0;
	}
	else flag=1 , cout << ans << endl ;

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;

	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	if(one==-1 || zero==-1 || (c+b)!= zero*one){
		cout << "Impossible" << endl;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}
	if(zero_rem!=0 || one_rem!=0)
		cout << "Impossible" << endl;
	else cout << ans << endl;

	return 0;

}