#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;
// #define int long long
mt19937 rnd(time(0));
typedef long long ll;
typedef long double ld;

// #define _GLIBCXX_DEBUG
#define f first
#define s second
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define int ll

void solve(){
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		a[x - 1] = i;
	}
	int ans[n];
	memset(ans, 0, sizeof(ans));
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		x--;
		if (i >= ans[i])
			ans[i - a[i]]++;
		else
			ans[n - 1 - (i - a[i])]++;
	}
	cout << *max_element(ans, ans + n) << endl;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int t = 1;
	while(t--){
		solve();
	}

	return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;
// #define int long long
mt19937 rnd(time(0));
typedef long long ll;
typedef long double ld;

// #define _GLIBCXX_DEBUG
#define f first
#define s second
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define int ll

void solve(){
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		a[x - 1] = i;
	}
	int ans[n];
	memset(ans, 0, sizeof(ans));
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		x--;
		if (i >= a[i])
			ans[i - a[i]]++;
		else
			ans[n - 1 - (i - a[i])]++;
	}
	cout << *max_element(ans, ans + n) << endl;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int t = 1;
	while(t--){
		solve();
	}

	return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;
// #define int long long
mt19937 rnd(time(0));
typedef long long ll;
typedef long double ld;

// #define _GLIBCXX_DEBUG
#define f first
#define s second
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define int ll

void solve(){
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		a[x - 1] = i;
	}
	int ans[n];
	memset(ans, 0, sizeof(ans));
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		x--;
		if (i >= a[i])
			ans[i - a[i]]++;
		else
			ans[n - (a[i] - i)]++;
	}
	cout << *max_element(ans, ans + n) << endl;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int t = 1;
	while(t--){
		solve();
	}

	return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;
// #define int long long
mt19937 rnd(time(0));
typedef long long ll;
typedef long double ld;

// #define _GLIBCXX_DEBUG
#define f first
#define s second
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define int ll

void solve(){
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		a[x - 1] = i;
	}
	int ans[n];
	memset(ans, 0, sizeof(ans));
	for (int i = 0; i < n; ++i) {
		int x;
		cin >> x;
		x--;
		if (i >= a[x])
			ans[i - a[x]]++;
		else
			ans[n - (a[x] - i)]++;
	}
	cout << *max_element(ans, ans + n) << endl;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int t = 1;
	while(t--){
		solve();
	}

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int a[200005],b[200005];
int main()
{
	int n,i,x,j,k,l,biao,sum=0,da=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	for(i=1;i<=n;i++){
		scanf("%d",&b[i]);
	}
	for(i=1;i<=n;i++){
		x=a[i];
		for(j=1;j<=n;j++){
			if(b[j]==x){
				biao=j-i;
//				printf("i=%d j=%d biao=%d\n",i,j,biao);
				if(biao<0){
					biao*=-1;
				}
				break;
			}
		}
		sum=0;
		for(j=i,k=j+biao,l=1;l<=n;l++){
			if(a[j]==b[k]){
				sum++;
			}
			j++;
			k++;
			if(k>n){
				k-=n;
			}
//			printf("j=%d k=%d sum=%d\n",j,k,sum);
		}
		if(sum>=da){
			da=sum;
		}
	}
	printf("%d\n",da);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<int,int> hash;
    int a[n],b[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hash[a[i]]=i;
    }
    for(int i=0;i<n;i++)cin>>b[i];
    int ans=1;
    for(int i=0;i<(2*n)-1;i++)
    {
        if(hash[b[(i+1)%n]]-hash[b[(i)%n]]==1)
        {int length=1;

            while(hash[b[(i+1)%n]]-hash[b[(i)%n]]==1)
            {
                i++;
                length++;
            }

            ans=max(ans,length);
        }
    }
    cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<int,int> hash;
    int a[n],b[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hash[a[i]]=i;
    }
    for(int i=0;i<n;i++)cin>>b[i];
     map<int,int> hash1;
    for(int i=0;i<n;i++)
    {
        hash1[hash[b[i]]-i]++;
    }
    int ans=-1;
    for(auto z:hash1)
{
	ans=max(ans,z.s);
}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<int,int> hash;
    int a[n],b[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hash[a[i]]=i;
    }
    for(int i=0;i<n;i++)cin>>b[i];
     map<int,int> hash1;
    for(int i=0;i<n;i++)
    {
        if(i>hash[b[i]])
        {
            hash1[n+hash[b[i]]-i]++;
        }
        else
        {
            hash1[hash[b[i]]-i]++;
        }
    }
    int ans=-1;
    for(auto z:hash1)
{
	ans=max(ans,z.second);
}
cout<<ans;

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<int,int> hash;
    int a[n],b[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hash[a[i]]=i;
    }
    for(int i=0;i<n;i++)cin>>b[i];
     map<int,int> hash1;
    for(int i=0;i<n;i++)
    {
        hash1[hash[b[i]]-i]++;
    }
    int ans=-1;
    for(auto z:hash1)
{
	ans=max(ans,z.second);
}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<int,int> hash;
    int a[n],b[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hash[a[i]]=i;
    }
    for(int i=0;i<n;i++)cin>>b[i];
    int map<int,int> hash1;
    for(int i=0;i<n;i++)
    {
        hash1[hash[b[i]]-i]++;
    }
    int ans=-1;
    for(auto z:hash1)
{
	ans=max(ans,z.s);
}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<int,int> hash;
    int a[n],b[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hash[a[i]]=i;
    }
    for(int i=0;i<n;i++)cin>>b[i];
     map<int,int> hash1;
    for(int i=0;i<n;i++)
    {
        hash1[hash[b[i]]-i]++;
    }
    int ans=-1;
    for(auto z:hash1)
{
	ans=max(ans,z.second);
}
cout<<ans;

}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5 + 10;
const int INF = 0x3f3f3f3f;
const double eps = 1e-7;
#define endl '\n'
#define pb(a) push_back(a)
#define ALL(x) x.begin(), x.end()
#define SIZE(x) int(x.size())
int a[N], b[N];
int p1[N], p2[N];
int main() {
    // ios::sync_with_stdio(false);
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &a[i]);
        p1[a[i]] = i;
    }
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &b[i]);
        p2[b[i]] = i;
    }
    int ans = 0;
    for (int i = 1; i <= n; ++i) {
        int k =
            min((p2[a[i]] - p1[a[i]] + n) % n, (-p2[a[i]] + p1[a[i]] + n) % n);
        // printf("%d\n", k);
        if (k != a[i]) continue;
        // printf("%d\n", k);
        int tmp = 0;
        if (k == (p2[a[i]] - p1[a[i]] + n) % n) {  // left
            for (int j = 1; j <= n; ++j) {
                p2[b[j]] = p2[b[j]] - k + n;
                tmp += p1[b[j]] == p2[b[j]];
            }
        } else {
            for (int j = 1; j <= n; ++j) {  // right
                p2[b[j]] = (p2[b[j]] + k) % n;
                if (p2[b[j]] == 0) p2[b[j]] = n;
                tmp += p1[b[j]] == p2[b[j]];
            }
        }
        ans = max(ans, tmp);
    }

    printf("%d\n", ans);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5 + 10;
const int INF = 0x3f3f3f3f;
const double eps = 1e-7;
#define endl '\n'
#define pb(a) push_back(a)
#define ALL(x) x.begin(), x.end()
#define SIZE(x) int(x.size())
int p[N];
int idx[N];
int main() {
    // ios::sync_with_stdio(false);
    int n;
    scanf("%d", &n);
    int ans = 0;
    int a, b;
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &a);
        idx[a] = i;
    }
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &b);
        p[(idx[b] - i + n) % n]++;
    }
    for (int i = 1; i <= n; ++i) ans = max(ans, p[i]);

    printf("%d\n", ans);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5 + 10;
const int INF = 0x3f3f3f3f;
const double eps = 1e-7;
#define endl '\n'
#define pb(a) push_back(a)
#define ALL(x) x.begin(), x.end()
#define SIZE(x) int(x.size())
int p[N];
int idx[N];
int main() {
    // ios::sync_with_stdio(false);
    int n;
    scanf("%d", &n);
    int ans = 0;
    int a, b;
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &a);
        idx[a] = i;
    }
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &b);
        p[(idx[b] - i + n) % n]++;
    }
    for (int i = 0; i < n; ++i) ans = max(ans, p[i]);

    printf("%d\n", ans);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5 + 10;
const int INF = 0x3f3f3f3f;
const double eps = 1e-7;
#define endl '\n'
#define pb(a) push_back(a)
#define ALL(x) x.begin(), x.end()
#define SIZE(x) int(x.size())
int a[N], b[N];
int p1[N], p2[N];
int main() {
    // ios::sync_with_stdio(false);
    int n;
    scanf("%d", &n);
    int ans = 0;
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &a[i]);
        p1[a[i]] = i;
    }
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &b[i]);
        p2[b[i]] = i;
        ans += p2[b[i]] == p1[b[i]];
    }

    for (int i = 1; i <= n; ++i) {
        int k =
            min((p2[a[i]] - p1[a[i]] + n) % n, (-p2[a[i]] + p1[a[i]] + n) % n);
        // printf("%d\n", k);
        if (k != a[i]) continue;
        // printf("%d\n", k);
        int tmp = 0;
        if (k == (p2[a[i]] - p1[a[i]] + n) % n) {  // left
            for (int j = 1; j <= n; ++j) {
                p2[b[j]] = (p2[b[j]] - k + n) % n;
                if (p2[b[j]] == 0) p2[b[j]] = n;
                tmp += p1[b[j]] == p2[b[j]];
            }
        } else {
            for (int j = 1; j <= n; ++j) {  // right
                p2[b[j]] = (p2[b[j]] + k) % n;
                if (p2[b[j]] == 0) p2[b[j]] = n;
                tmp += p1[b[j]] == p2[b[j]];
            }
        }
        ans = max(ans, tmp);
    }

    printf("%d\n", ans);
    return 0;
}


#include <bits/stdc++.h>
#define fin freopen("input.txt","r", stdin);
#define fout freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    fin;
    int n, a[200005], b[200005], i, j;
    map<int, int>mp1, mp2;
    vector<int> v;
    cin >> n;
    for(i = 1; i <= n; i ++) {
        cin >> a[i];
        mp1[a[i]] = i;
    }
    for(i = 1; i <= n; i ++){
        cin >> b[i];
    }

    for(i = 1; i <= n; i ++) {
        if(mp1[b[i]] - i < 0) {
            v.push_back(mp1[b[i]] - i + n);
        }
        else {
            v.push_back(mp1[b[i]] - i);
        }
    }

    sort(v.begin(), v.end());
    int ans = 0, counter = 0, previous = v[0];
    for(i = 0; i < v.size(); i ++) {
        if(previous == v[i]) {
            counter ++;
        }
        else {
            previous = v[i];
            ans = max(ans, counter);
            counter = 1;
        }
    }
    ans = max(ans, counter);
    cout << ans << endl;
}


#include <bits/stdc++.h>
#define fin freopen("input.txt","r", stdin);
#define fout freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    fin;
    int n, a[200005], b[200005], i, j;
    map<int, int>mp1, mp2;
    vector<int> v;
    cin >> n;
    for(i = 1; i <= n; i ++) {
        cin >> a[i];
        mp1[a[i]] = i;
    }
    for(i = 1; i <= n; i ++){
        cin >> b[i];
    }

    for(i = 1; i <= n; i ++) {
        if(mp1[b[i]] - i < 0) {
            v.push_back(mp1[b[i]] - i + n);
        }
        else {
            v.push_back(mp1[b[i]] - i);
        }
    }

    sort(v.begin(), v.end());
    int ans = 0, counter = 0, previous = v[0];
    for(i = 0; i < v.size(); i ++) {
        if(previous == v[i]) {
            counter ++;
        }
        else {
            ans = max(ans, counter);
            counter = 0;
        }
    }
    ans = max(ans, counter);
    cout << ans << endl;
}


#include <bits/stdc++.h>
#define fin freopen("input.txt","r", stdin);
#define fout freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    fin;
    int n, a[100005], b[100005], i, j;
    map<int, int>mp1, mp2;
    vector<int> v;
    cin >> n;
    for(i = 1; i <= n; i ++) {
        cin >> a[i];
        mp1[a[i]] = i;
    }
    for(i = 1; i <= n; i ++){
        cin >> b[i];
        mp2[b[i]] = i;
    }

    for(i = 1; i <= n; i ++) {
        v.push_back(mp1[i] - mp2[i]);
    }

    int num1 = 1e6, num2 = 1e6;
    for(i = 0; i < v.size() - 1; i ++) {
        if(v[i] < 0 && v[i + 1] > 0 && abs(v[i]) + v[i + 1] == n) {
            num1 = v[i];
            num2 = v[i + 1];
        }
    }

    if(num1 == 1000000) {
        cout << 1 << endl;
    }
    else {
        int ans = 0;
        for(i = 0; i < v.size(); i ++) {
            if(v[i] == num1 || v[i] == num2) ans ++;
        }
        cout << ans << endl;
    }
}


#include <bits/stdc++.h>
#define fin freopen("input.txt","r", stdin);
#define fout freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    fin;
    int n, a[200005], b[200005], i, j;
    map<int, int>mp1, mp2;
    vector<int> v;
    cin >> n;
    for(i = 1; i <= n; i ++) {
        cin >> a[i];
        mp1[a[i]] = i;
    }
    for(i = 1; i <= n; i ++){
        cin >> b[i];
    }

    for(i = 1; i <= n; i ++) {
        if(mp1[b[i]] - i < 0) {
            v.push_back(mp1[b[i]] - i + n);
        }
        else {
            v.push_back(mp1[b[i]] - i);
        }
    }

    sort(v.begin(), v.end());
    int ans = 0, counter = 0, previous = v[0];
    for(i = 0; i < v.size(); i ++) {
        if(previous == v[i]) {
            counter ++;
        }
        else {
            ans = max(ans, counter);
            counter = 0;
        }
    }
    cout << ans << endl;
}


#include <bits/stdc++.h>
#define fin freopen("input.txt","r", stdin);
#define fout freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    fin;
    int n, a[200005], b[200005], i, j;
    map<int, int>mp1, mp2;
    vector<int> v;
    cin >> n;
    for(i = 1; i <= n; i ++) {
        cin >> a[i];
        mp1[a[i]] = i;
    }
    for(i = 1; i <= n; i ++){
        cin >> b[i];
        mp2[b[i]] = i;
    }

    for(i = 1; i <= n; i ++) {
        v.push_back(mp1[i] - mp2[i]);
    }

    int num1 = 1e6, num2 = 1e6;
    for(i = 0; i < v.size() - 1; i ++) {
        if(v[i] < 0 && v[i + 1] > 0 && abs(v[i]) + v[i + 1] == n) {
            num1 = v[i];
            num2 = v[i + 1];
        }
    }

    if(num1 == 1000000) {
        cout << 1 << endl;
    }
    else {
        int ans = 0;
        for(i = 0; i < v.size(); i ++) {
            if(v[i] == num1 || v[i] == num2) ans ++;
        }
        cout << ans << endl;
    }
}


#include<iostream>
#include<cstdio>
#include<map>
#define N 200003
using namespace std;
int a[N],b[N];
int pos[N];
int cnt[N];
int n,ans;
int main()
{
	cin>>n;
	int i;
	for(i=1;i<=n;i++) scanf("%d",a+i);
	for(i=1;i<=n;i++) scanf("%d",b+i);
	for(i=1;i<=n;i++) pos[a[i]]=i;
	for(i=1;i<=n;i++) cnt[i>pos[b[i]]?n-i+pos[b[i]]:pos[b[i]]-i]++;
	for(i=0;i<=n-1;i++) ans=max(cnt[i],ans);
	cout<<ans<<endl;
	return 0;
}


#include<iostream>
#include<cstdio>
#include<map>
#define N 200003
using namespace std;
int a[N],b[N];
int pos[N];
map<int,int>cnt;
int n;
int main()
{
	cin>>n;
	int i;
	for(i=1;i<=n;i++) scanf("%d",a+i);
	for(i=1;i<=n;i++) scanf("%d",b+i);
	for(i=1;i<=n;i++) pos[a[i]]=i;
	for(i=1;i<=n;i++)
	{
		int step;
		if(i>pos[b[i]]) step=n-i+pos[b[i]];
		else step=pos[b[i]]-i;
		cnt[step]++;
	}
	int ans=0;
	for(auto &it:cnt) ans=max(it.second,ans);
	cout<<ans<<endl;
	return 0;
}


#include<iostream>
#include<cstdio>
#include<map>
#define N 200003
using namespace std;
int a[N],b[N];
int pos[N];
map<int,int>step;
int n;
int main()
{
	cin>>n;
	int i;
	for(i=1;i<=n;i++) scanf("%d",a+i);
	for(i=1;i<=n;i++) scanf("%d",b+i);
	for(i=1;i<=n;i++) pos[a[i]]=i;
	for(i=1;i<=n;i++)
	{
		int pace;
		if(i>pos[b[i]]) pace=n-i+pos[b[i]];
		else pace=pos[b[i]]-i;
		step[pace]++;
	}
	int ans=0;
	for(i=1;i<=n-1;i++) ans=max(step[i],ans);
	cout<<ans<<endl;
	return 0;
}


#include<iostream>
#include<vector>
#include<list>
#include<algorithm>
#include<stack>
#include<string>
#include<set>
#include<algorithm>
using namespace std;
struct s{
	int r, c;
};
int main(){
	int r, c, n = 0, row = 0, colm = 0;
	cin>>r>>c;
	char**a = new char*[r];
	s *b = new s[3];
	for (int i = 0; i < r; i++)
		a[i] = new char[c];
	bool e = false;
	for (int i = 0; i<r; i++)
	for (int j = 0; j < c; j++)
		cin>>a[i][j];
	int k = 0;
	for (int i = 0; i<r; i++){
		e = false;
		for (int j = 0; j<c; j++){
			if (a[i][j] == '*'){
				b[k].r = i + 1;
				b[k].c = j + 1;
				k++;
			}
		}
	}

		if (b[0].r == b[1].r){
				n = b[1].c - b[0].c;
				if (b[0].c == b[2].c){
					row = b[2].r;
					colm = b[2].c + n;
				}
				else if (b[1].c == b[2].c){
					row = b[2].r;
					colm = b[2].c - n;
				}

		}

		else if (b[1].r == b[2].r){
			n = b[2].c - b[1].c;
			if (b[0].c == b[2].c){
				row = b[0].r;
				colm = b[0].c - n;
			}
			else if (b[0].c == b[1].c){
				row = b[0].r;
				colm = b[0].c + n;
			}
		}

		cout << row << " " << colm << endl;

	return 0;
}


#include<iostream>
#include<vector>
#include<list>
#include<algorithm>
#include<stack>
#include<string>
#include<set>
#include<algorithm>
using namespace std;
struct s{
	int r, c;
};
int main(){
	int r, c, n = 0, row = 0, colm = 0;
	cin>>r>>c;
	char**a = new char*[r];
	s *b = new s[3];
	for (int i = 0; i < r; i++)
		a[i] = new char[c];
	bool e = false;
	for (int i = 0; i<r; i++)
	for (int j = 0; j < c; j++)
		cin>>a[i][j];
	int k = 0;
	for (int i = 0; i<r; i++){
		e = false;
		for (int j = 0; j<r; j++){
			if (a[i][j] == '*'){
				b[k].r = i + 1;
				b[k].c = j + 1;
				k++;
			}
		}
	}

		if (b[0].r == b[1].r){
				n = b[1].c - b[0].c;
				if (b[0].c == b[2].c){
					row = b[2].r;
					colm = b[2].c + n;
				}
				else if (b[1].c == b[2].c){
					row = b[2].r;
					colm = b[2].c - n;
				}

		}

		else if (b[1].r == b[2].r){
			n = b[2].c - b[1].c;
			if (b[0].c == b[2].c){
				row = b[0].r;
				colm = b[0].c - n;
			}
			else if (b[0].c == b[1].c){
				row = b[0].r;
				colm = b[0].c + n;
			}
		}

		cout << row << " " << colm << endl;

	return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long

int main() {
	int n, m;
	cin >> n >> m;
	char a[100][100];
	for(int i = 0; i < n; ++i)
		for(int j = 0; j < m; ++j)
			cin >> a[i][j];
	int b[101], c[101];
	memset(b, 0, sizeof(b));
	memset(c, 0, sizeof(c));
	for(int i = 0;i < n; ++i) {
		for(int j = 0; j < m; ++j) {
			if (a[i][j] == '*') {
				++b[i];
				++c[j];
			}
		}
	}
	for(int i = 0; i < n; ++i)
		if (b[i] == 1) {
			cout << i + 1 << " ";
			break;
		}
	for(int i = 0; i < m; ++i) {
		if (c[i] == 1)  {
			cout << i + 1 << "\n";
			return 0;
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    char a[n][m];
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<m;j++)
        {
            cin>>a[i][j];
        }
    }
    vector<pair<int,int>> v;
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<m;j++)
        {
            if(a[i][j]=='*')
            {
                v.push_back(make_pair(i+1,j+1));
            }
        }
    }
    if(v[0].first==v[1].first)
    {
        cout<<v[2].first<<" ";
    }else if(v[0].first==v[2].first){
        cout<<v[1].first<<" ";
    }else{
        cout<<v[0].first<<" ";
    }
    if(v[0].second==v[1].second)
    {
        cout<<v[2].second<<" ";
    }else if(v[0].second==v[2].second){
        cout<<v[1].second<<" ";
    }else{
        cout<<v[0].second<<" ";
    }

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    char a[n][m];
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<m;j++)
        {
            cin>>a[i][j];
        }
    }
    vector<pair<int,int>> v;
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<m;j++)
        {
            if(a[i][j]=='*')
            {
                v.push_back(make_pair(i+1,j+1));
            }
        }
    }
    if(v[0].first==v[1].first)
    {
        cout<<v[2].first<<" ";
    }else{
        cout<<v[0].first<<" ";
    }
    if(v[0].second==v[1].second)
    {
        cout<<v[2].second<<" ";
    }else{
        cout<<v[1].second<<" ";
    }

}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    for(;;)
    {
        int row=0,col=0;
        int r,c;
        cin>>r>>c;
        for(int i=0,k=0;i<r;i++)
        {
            for(int j=0;j<c;j++)
            {
                char a;
                cin>>a;
                if(a=='*')
                {
                    row^=i;
                    col^=j;
                }
            }
        }
        cout<<row+1<<" "<<col+1<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    //for(;;)
    //{
        int row=0,col=0;
        int r,c;
        cin>>r>>c;
        for(int i=0,k=0;i<r;i++)
        {
            for(int j=0;j<c;j++)
            {
                char a;
                cin>>a;
                if(a=='*')
                {
                    row^=i;
                    col^=j;
                }
            }
        }
        cout<<row+1<<" "<<col+1<<endl;
    //}
}


#include<bits/stdc++.h>

using namespace std;

int main(){

	ios :: sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

	int n,m;

	cin>>n>>m;

	string s[n];

	for(auto &i : s){

		cin>>i;
	}

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

		int star = 0;

		for(int j=0; j<m; j++){

			if(s[i][j] == '*'){

				star++;
			}
		}

		if(star == 1){

			cout<<i+1;

			break;
		}
	}

	cout<<" ";

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

		int star = 0;

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

			if(s[j][i] == '*'){

				star++;
			}
		}

		if(star == 1){

			cout<<i+1;

			break;
		}
	}
}


#include<bits/stdc++.h>

using namespace std;

int main(){

	ios :: sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

	int n,m;

	cin>>n>>m;

	string s[n];

	for(auto &i : s){

		cin>>i;
	}

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

		int star = 0;

		for(int j=0; j<m; j++){

			if(s[i][j] == '*'){

				star++;
			}
		}

		if(star == 1){

			cout<<i+1;

			break;
		}
	}

	cout<<" ";

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

		int star = 0;

		for(int j=0; j<m; j++){

			if(s[j][i] == '*'){

				star++;
			}
		}

		if(star == 1){

			cout<<i+1;

			break;
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pp pop_back

using namespace std;

const ll INF = 1E18;
const ld EPS = 1E-10;
const int N = 1e5+1;
const ll MOD = 1E9+7;

int n,m;
int main()
{
    std::cin>>n>>m;
    int x=0,y=0;
    for(int i=0;i<n;i++)
    {
        std::string line;
        std::cin>>line;
        for(int j=0;j<m;j++)
        {
            if(line[j]=='*')
            {
                x^=i;
                y^=j;
            }
        }
    }
    std::cout<<x+1<<" "<<y+1;
    return 0;
}


#include<iostream>
using namespace std;
const int MAX=100;
bool map[MAX][MAX];
int n,m,a,b,s;
char c;
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			cin>>c;
			if(c=='*')map[i][j]=true;
		}
	}
	for(int i=1;i<=n;i++)
	{
		s=0;
		for(int j=1;j<=m;j++)
		{
			if(map[i][j])s++;
		}
		if(s==1)a=i;
	}
	for(int i=1;i<=m;i++)
	{
		s=0;
		for(int j=1;j<=n;j++)
		{
			if(map[j][i])s++;
		}
		if(s==1)b=i;

	}
	cout<<a<<" "<<b;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define Abs(x)((x) < 0 ? (x) * -1 : (x))

#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y) - 1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y) - 1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define repit2(x) for (__typeof((x).begin()) it2 = (x).begin(); it2 != (x).end(); it2++)
#define nepit(x) for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)

#define All(x) (x).begin(),(x).end()

#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))

// can be applied to string type
#define Unique(v) v.resize(unique(All(v)) - v.begin())

#define peq(p0, p1)(p0.first == p1.first && p0.second == p1.second)

#define End '\n'
#define Out(x) cout<<(x)<<End
template<typename T>
void Outln(const string &sep, const T &val) { cout << val << End; }
template<typename T, typename... Args>
void Outln(const string &sep, const T &val, Args... args) {
    cout << val << sep;
	Outln(sep, std::forward<Args>(args)...);
}
template<typename T>
void OutN(T x) {
	size_t i, len = x.size() - 1;

	for (i = 0; i < len; i++) cout << x[i] << " ";
	cout << x[len] << '\n';
}
#define OutaN(x)                                                     \
    do {                                                             \
        size_t i, len = sizeof(x) / sizeof(__typeof(x[0])) - 1;      \
        for (i = 0; i < len; i++) cout << x[i] << " ";               \
        cout << x[len] << '\n';                                      \
    } while (0);

template<typename T>
void Outit(T x) {
	auto end = x.end();

	end--;

	for (auto it = x.begin(); it != end; it++) cout << *it << " ";
	cout << *end << '\n';
}
template<typename T>
void Debug(const T &val) { cerr << val << End; }
template<typename T, typename... Args>
void Debug(const T &val, Args... args) {
    cerr << val << ' ';
	Debug(std::forward<Args>(args)...);
}

template<typename T> inline bool Max(T &x, const T &y) { return x < y ? x = y, 1 : 0; }
template<typename T> inline bool Min(T &x, const T &y) { return x > y ? x = y, 1 : 0; }
template<typename T> using V = vector<T>;
template<typename T> using VV = V<V<T> >;

// can be applied to string type
#define Sort(v) sort(All(v))
#define SortR(v) sort(All(v), std::greater<__typeof(v[0])>())
// array sorters
#define Sart(a) sort(a, a + sizeof(a) / sizeof(__typeof(a[0])));
#define SartR(a) sort(a, a + sizeof(a) / sizeof(__typeof(a[0])), std::greater<__typeof(a[0])>())

#define pb push_back
#define mp make_pair
#define a first
#define b second
#define lb std::lower_bound
#define ub std::upper_bound

#define lbi(v, x) lb(All(v), (x))-v.begin()
#define ubi(v, x) ub(All(v), (x))-v.begin()

inline string Str(const char &ch, const int &n) { return string(n, ch); }
inline string Str(const int &n, const char &ch) { return string(n, ch); }
vector<string> getStrLine() {
	vector<string> v;
	string str;

	getline(cin, str);

	istringstream iss(str);

	for (string word; iss >> word;) v.push_back(word);

	return v;
}

static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;

#define LOCAL 0

int main()
{
#if LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    freopen("debug.txt", "w", stderr);
#endif

    cin.tie(0);
    ios::sync_with_stdio(false);
	//std::cout.precision(18);

	int n, m;

	cin >> n >> m;

	string grid[n];
	V<pair<int, int> > v;
	int x, y;

	int i, j;

	rep(i, n) cin >> grid[i];

	rep(i, n) {
		rep(j, m) {
			if (grid[i][j] == '*') v.pb(mp(i, j));
		}
	}

    Sort(v);

	if (v[0].a == v[1].a) {
		if (v[0].b == v[2].b) {
			y = v[2].a;
			x = v[1].b;
		} else {
			y = v[2].a;
			x = v[0].b;
		}
	} else {
		if (v[0].b == v[1].b) {
			y = v[0].a;
			x = v[2].b;
		} else {
			y = v[0].a;
			x = v[1].b;
		}
	}

	Outln(" ", y + 1, x + 1);

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define Abs(x)((x) < 0 ? (x) * -1 : (x))

#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y) - 1; 0 <= (x); (x)--)
#define nepi(x, y, z) for ((x) = (y) - 1; (z) <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repis(x, y, z, s) for ((x) = (z); (x) < (y); (x) += (s))
#define repiins(x, y, z, s) for ((x) = (z); (x) <= (y); (x) += (s))
#define repit(x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define repit2(x) for (__typeof((x).begin()) it2 = (x).begin(); it2 != (x).end(); it2++)
#define nepit(x) for (__typeof((x).rbegin()) it = (x).rbegin(); it != (x).rend(); it++)

#define All(x) (x).begin(),(x).end()

#define Mem0(x) memset(x, 0, sizeof(x))
#define Mem1(x) memset(x, -1, sizeof(x))

// can be applied to string type
#define Unique(v) v.resize(unique(All(v)) - v.begin())

#define peq(p0, p1)(p0.first == p1.first && p0.second == p1.second)

#define End '\n'
#define Out(x) cout<<(x)<<End
template<typename T>
void Outln(const string &sep, const T &val) { cout << val << End; }
template<typename T, typename... Args>
void Outln(const string &sep, const T &val, Args... args) {
    cout << val << sep;
	Outln(sep, std::forward<Args>(args)...);
}
template<typename T>
void OutN(T x) {
	size_t i, len = x.size() - 1;

	for (i = 0; i < len; i++) cout << x[i] << " ";
	cout << x[len] << '\n';
}
#define OutaN(x)                                                     \
    do {                                                             \
        size_t i, len = sizeof(x) / sizeof(__typeof(x[0])) - 1;      \
        for (i = 0; i < len; i++) cout << x[i] << " ";               \
        cout << x[len] << '\n';                                      \
    } while (0);

template<typename T>
void Outit(T x) {
	auto end = x.end();

	end--;

	for (auto it = x.begin(); it != end; it++) cout << *it << " ";
	cout << *end << '\n';
}
template<typename T>
void Debug(const T &val) { cerr << val << End; }
template<typename T, typename... Args>
void Debug(const T &val, Args... args) {
    cerr << val << ' ';
	Debug(std::forward<Args>(args)...);
}

template<typename T> inline bool Max(T &x, const T &y) { return x < y ? x = y, 1 : 0; }
template<typename T> inline bool Min(T &x, const T &y) { return x > y ? x = y, 1 : 0; }
template<typename T> using V = vector<T>;
template<typename T> using VV = V<V<T> >;

// can be applied to string type
#define Sort(v) sort(All(v))
#define SortR(v) sort(All(v), std::greater<__typeof(v[0])>())
// array sorters
#define Sart(a) sort(a, a + sizeof(a) / sizeof(__typeof(a[0])));
#define SartR(a) sort(a, a + sizeof(a) / sizeof(__typeof(a[0])), std::greater<__typeof(a[0])>())

#define pb push_back
#define mp make_pair
#define a first
#define b second
#define lb std::lower_bound
#define ub std::upper_bound

#define lbi(v, x) lb(All(v), (x))-v.begin()
#define ubi(v, x) ub(All(v), (x))-v.begin()

inline string Str(const char &ch, const int &n) { return string(n, ch); }
inline string Str(const int &n, const char &ch) { return string(n, ch); }
vector<string> getStrLine() {
	vector<string> v;
	string str;

	getline(cin, str);

	istringstream iss(str);

	for (string word; iss >> word;) v.push_back(word);

	return v;
}

static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;

#define LOCAL 0

int main()
{
#if LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    freopen("debug.txt", "w", stderr);
#endif

    cin.tie(0);
    ios::sync_with_stdio(false);
	//std::cout.precision(18);

	int n, m;

	cin >> n >> m;

	string grid[n];
	V<pair<int, int> > v;
	pair<int, int> p1, p2, p3;
	int x, y;
	int x1, y1, x2, y2;

	int i, j;

	rep(i, n) cin >> grid[i];

	rep(i, n) {
		rep(j, m) {
			if (grid[i][j] == '*') v.pb(mp(i, j));
		}
	}

	p1 = v[0];
    repi(i, 3, 1) {
		p2 = v[i];
		y = p2.a - p1.a;
		x = p2.b - p1.b;

		if (i == 1) {
			p3 = v[2];

			y1 = p3.a + y;
			x1 = p3.b + x;
			y2 = p3.a - y;
			x2 = p3.b - x;
		} else {
			p3 = v[1];

			y1 = p3.a + y;
			x1 = p3.b + x;
			y2 = p3.a - y;
			x2 = p3.b - x;
		}

		if (0 <= y1 && y1 < n && 0 <= x1 && x1 < m) {
			Outln(" ", y1 + 1, x1 + 1);

			break;
		} else if (0 <= y2 && y2 < n && 0 <= x2 && x2 < m) {
			Outln(" ", y2 + 1, x2 + 1);

			break;
		}
	}

	return 0;
}


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="1" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		</Compiler>
		<Unit filename="main.cpp" />
		<Extensions>
			<code_completion />
			<envvars />
			<debugger />
		</Extensions>
	</Project>
</CodeBlocks_project_file>


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int n, m, a[101], b[101], x, y;
char c [101][101];

int main(){
    cin >> n >> m;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            cin >> c[i][j];
            if (c[i][j] == '*') a[i]++, b[j]++;
        }
    }
    for (int i = 0; i < n; ++i) {
        if (a[i] == 1) x = i + 1;
    }
    for (int i = 0; i < m; ++i) {
        if (b[i] == 1) y = i + 1;
    }
    cout << x << " " << y;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
 int n,m,a[101] ={0},b[101] = {0};
 cin>>n>>m;
 char c;
  for(int i=0;i<n;i++){
   for(int j=0;j<m;j++)
    {
     cin>>c;
       if(c=='*')
       {
         a[i]++;
         b[j]++;
       }
    }
   }
   for(int i=0;i<n;i++)
   {
       if(a[i]==1)
        cout<<i<<" ";
   }
   for(int i=0;i<m;i++)
   {
      if(b[i]==1)
       cout<<i<<endl;
   }

   return 0;
 }


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

int main()
{
  int n , m , x ,y;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == "*") x^=i; y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  string a;
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*')
      {x^=i;
      y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  string  a;
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == "*") x^=i; y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x+1<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x+1<<" "<<y+1;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y, i , j;
  string a;
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y,i,j;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x+1<<" "<<y+1;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  string a;
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*')
      {
          x^=i;
          y^=j;
      }
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == "*") x^=i; y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  char a[100];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x<<" "<<y;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  char a[101];
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x+1<<" "<<y+1;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  string a;
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*'){ x^=i; y^=j;}
    }
  }
  cout<<x+1<<" "<<y+1;

  return 0;

}


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

int main()
{
  int n , m , x ,y;
  string a;
  x =0;
  y = 0;

  cin>>n;
  cin>>m;

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

    for(int j = 0 ; j < m ; j++)
    {
      if ( a[j] == '*') x^=i; y^=j;
    }
  }
  cout<<x+1<<" "<<y+1;

  return 0;

}


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

typedef unsigned long long ll;
ll t,i,j,n,k,x,y,a,b;
string s,s1,s2;
float f;
const ll M=1e9+7;

ll mod(ll x)
{
    return((x%M+M)%M);
}
ll add(ll a,ll b)
{
    return mod(mod(a)+mod(b));
}
ll mul(ll a,ll b)
{
    return mod(mod(a)*mod(b));
}

int main()
{
    int n,m;
   cin>>n>>m;
   map<int,int>r;
   map<int,int>c;

   char x;
   int i,j;
   for(i=0;i<n;i++)
   {
       for(j=0;j<m;j++)
       {
           cin>>x;
           if(x=='*')
           {
               r[i]++;
               c[j]++;
           }
       }
   }
    for(auto i:r)
       {
           if(i.second==1)
           cout<<i.first<<" ";
       }
       for(auto i:c)
       {
           if(i.second==1)
           cout<<i.first<<" ";
       }

   return 0;
}


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

typedef unsigned long long ll;
ll t,i,j,n,k,x,y,a,b;
string s,s1,s2;
float f;
const ll M=1e9+7;

ll mod(ll x)
{
    return((x%M+M)%M);
}
ll add(ll a,ll b)
{
    return mod(mod(a)+mod(b));
}
ll mul(ll a,ll b)
{
    return mod(mod(a)*mod(b));
}

int main()
{
    int n,m;
   cin>>n>>m;
   map<int,int>r;
   map<int,int>c;

   char x;
   int i,j;
   for(i=0;i<n;i++)
   {
       for(j=0;j<m;j++)
       {
           cin>>x;
           if(x=='*')
           {
               r[i+1]++;
               c[j+1]++;
           }
       }
   }
    for(auto i:r)
       {
           if(i.second==1)
           cout<<i.first<<" ";
       }
       for(auto i:c)
       {
           if(i.second==1)
           cout<<i.first<<" ";
       }

   return 0;
}


/**
 * Created with IntelliJ IDEA.
 * User: Zakhar_Voit
 * Date: 21.04.12
 * Time: 1:48
 */

import java.io.*;
import java.util.*;

import static java.lang.System.exit;

public class A {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st = new StringTokenizer("");

    int n, m, anxx, anxy;
    char[][] mp;

    public void openIO() throws IOException {
        if (new File("input.txt").exists()) {
            System.setIn(new FileInputStream("input.txt"));
            out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
        } else {
            out = new PrintWriter(System.out);
        }
        in = new BufferedReader(new InputStreamReader(System.in));
    }

    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }

    boolean EOF() throws IOException {
        while (!st.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null)
                return true;
            st = new StringTokenizer(s);
        }
        return false;
    }

    void init() {

    }

    void read() throws IOException {
        n = nextInt(); m = nextInt();
        mp = new char[n][m];
        for (int i = 0; i < n; i++) {
            String x = nextToken();
            mp[i] = x.toCharArray();
        }
    }

    void solve() {
        int[] x = new int[4], y = new int[4];
        int lx = 0, ly = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                if (mp[i][j] == '*') {
                    x[lx++] = i;
                    y[ly++] = j;
                }
            }
        }

        int minx = Math.min(x[0], Math.min(x[1], x[2])), maxx = Math.max(x[0], Math.max(x[1], x[2])),
                miny = Math.min(y[0], Math.min(y[1], y[2])), maxy = Math.max(y[0], Math.max(y[1], y[2]));
        if (mp[minx][miny] != '*') {
            anxx = minx;
            anxy = miny;
            return;
        }

        if (mp[minx][maxy] != '*') {
            anxx = minx;
            anxy = maxy;
            return;
        }

        if (mp[maxx][miny] != '*') {
            anxx = maxx;
            anxy = miny;
            return;
        }

        if (mp[maxx][maxy] != '*') {
            anxx = maxx;
            anxy = maxy;
            return;
        }

    }

    void write() {
        out.println((anxx+1) + " " + (anxy+1));
    }

    public void run() throws IOException {
        openIO();
        init();
        read();
        solve();
        write();
        out.close();
    }

    static public void main(String[] args) throws IOException {
        new Thread(null, new Runnable() {
            public void run() {
                try {
                    new A().run();
                } catch (Throwable e) {
                    e.printStackTrace();
                    exit(999);
                }
            }
        }, "1", 1 << 23).start();
    }
}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;

public class Main {

	/**
	 * @param args
	 */

	static int R,C;

	public static void main(String[] args) {

		BufferedReader read = new BufferedReader( new InputStreamReader(System.in) );

		try{
			String str = read.readLine();
			StringTokenizer token = new StringTokenizer(str);
			R = Integer.parseInt( token.nextToken());
			C = Integer.parseInt( token.nextToken());

			Point p[] = new Point[3];
			p[0] = new Point();
			p[1] = new Point();
			p[2] = new Point();
			int cnt = 0;
			for( int i = 0; i < R; i++ ){
				str = read.readLine();

				int ind = str.indexOf("*", 0);
				if( ind > -1 ){
					p[ cnt++ ].setLocation(i, ind);
					ind = str.indexOf("*", ind+1);
					if( ind > -1 )
						p[ cnt++ ].setLocation(i, ind);
				}
			}

			for( int i = 0; i < 3; i++ ){
				p[i].x++; p[i].y++;
				//System.out.println( p[i].x + " " + p[i].y );
			}

			if( p[0].x == p[1].x ){
				if( p[0].y == p[2].y )
					System.out.println( p[2].x + " " + p[1].y );
				else
					System.out.println( p[2].x + " " + p[0].y );
			}

			else if( p[0].y == p[1].y ){
				if( p[0].x == p[2].x )
					System.out.println( p[1].x + " " + p[2].y );
				else
					System.out.println( p[0].x + " " + p[2].y );
			}

			else if( p[1].x == p[2].x ){

				if( p[1].y == p[0].y )
					System.out.println( p[0].x + " " + p[2].y );
				else
					System.out.println( p[0].x + " " + p[1].y );
			}

			else if( p[1].y == p[2].y ){
				if( p[1].x == p[0].x )
					System.out.println( p[2].x + " " + p[0].y );
				else
					System.out.println( p[1].x + " " + p[0].y );
			}

			else if( p[0].x == p[2].x ){
				if( p[0].y == p[1].y )
					System.out.println( p[1].x + " " + p[2].y );
				else
					System.out.println( p[1].x + " " + p[0].y );
			}

			else if( p[0].y == p[2].y ){
				if( p[0].x == p[1].x )
					System.out.println( p[2].x + " " + p[1].y );
				else
					System.out.println( p[0].x + " " + p[1].y );
			}
			//System.out.println("df");

		}
		catch( Exception e ){
			System.out.println(e.toString());
		}

	}

}
/*
2 5
*....
*...*
1 1
 * */


import java.awt.Point;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;

public class Main {

	/**
	 * @param args
	 */

	static int R,C;

	public static void main(String[] args) {

		BufferedReader read = new BufferedReader( new InputStreamReader(System.in) );

		try{
			String str = read.readLine();
			StringTokenizer token = new StringTokenizer(str);
			R = Integer.parseInt( token.nextToken());
			C = Integer.parseInt( token.nextToken());

			Point p[] = new Point[3];
			p[0] = new Point();
			p[1] = new Point();
			p[2] = new Point();
			int cnt = 0;
			for( int i = 0; i < R; i++ ){
				str = read.readLine();

				int ind = str.indexOf("*", 0);
				if( ind > -1 ){
					p[ cnt++ ].setLocation(i, ind);
					ind = str.indexOf("*", ind+1);
					if( ind > -1 )
						p[ cnt++ ].setLocation(i, ind);
				}
			}

			for( int i = 0; i < 3; i++ ){
				p[i].x++; p[i].y++;
			}

			if( p[0].x == p[1].x ){
				if( p[0].y == p[2].y )
					System.out.println( p[2].x + " " + p[1].y );
				else
					System.out.println( p[2].x + " " + p[0].y );
			}

			else if( p[0].y == p[1].y ){
				if( p[0].x == p[2].x )
					System.out.println( p[1].x + " " + p[2].y );
				else
					System.out.println( p[0].x + " " + p[0].y );
			}

			else if( p[1].x == p[2].x ){
				if( p[1].y == p[0].y )
					System.out.println( p[0].x + " " + p[2].y );
				else
					System.out.println( p[0].x + " " + p[1].y );
			}

			else if( p[1].y == p[2].y ){
				if( p[1].x == p[0].x )
					System.out.println( p[2].x + " " + p[0].y );
				else
					System.out.println( p[1].x + " " + p[0].y );
			}

			else if( p[0].x == p[2].x ){
				if( p[0].y == p[1].y )
					System.out.println( p[1].x + " " + p[2].y );
				else
					System.out.println( p[1].x + " " + p[0].y );
			}

			else if( p[0].y == p[2].y ){
				if( p[0].x == p[1].x )
					System.out.println( p[2].x + " " + p[1].y );
				else
					System.out.println( p[0].x + " " + p[1].y );
			}
			//System.out.println("df");

		}
		catch( Exception e ){
			System.out.println(e.toString());
		}

	}

}


import static java.lang.Math.acos;
import static java.lang.Math.cos;
import static java.lang.Math.sin;
import static java.lang.Math.sqrt;
import static java.lang.System.in;
import static java.lang.System.out;
import java.io.*;
import java.util.*;

public class A181 {
	static final double EPS = 1e-10;
	static final double INF = 1 << 31;
	static final double PI = Math.PI;

	public static Scanner sc = new Scanner(in);
	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public void run() throws IOException {
		String input;
		String[] inputArray;
		input = br.readLine();
		inputArray = input.split(" ");

		int n = Integer.valueOf(inputArray[0]);
		int m = Integer.valueOf(inputArray[1]);
		P [] ver = new P[3];
		int num=0;
		for (int i=1; i<=n; i++){
			input = br.readLine();
			for (int j=1; j<=m; j++)
				if (input.charAt(j-1)=='*') ver[num++]=new P(i,j);
		}
		double d01,d02,d12;
		d01 = ver[0].dist2(ver[1]);
		d02 = ver[0].dist2(ver[2]);
		d12 = ver[1].dist2(ver[2]);
		if (d01>d02 && d01>d12){
			ln(((int)(ver[0].x + ver[1].x -ver[2].x)) + " " + ((int)(ver[0].y + ver[1].y -ver[2].y)));
		} else if (d02 >d12){
			ln(((int)(ver[0].x + ver[2].x -ver[1].x))+ " " + ((int)(ver[0].y + ver[2].y -ver[1].y)));
		} else{
			ln(((int)(ver[1].x + ver[2].x -ver[0].x)) + " " + ((int)(ver[1].y + ver[2].y -ver[0].y)));
		}
	}

	public static void main(String[] args) throws IOException {
		new A181().run();
	}
	public static void ln(Object obj) {
		out.println(obj);
	}
	static class P{

		static final double EPS=1e-10;
		static final double INF = 1<<31;
		static final double PI = Math.PI;
		static int signum(double x){
			return x<-EPS?-1:x>EPS?1:0;
		}
	static Comparator<P> comp=new Comparator<P>(){
		public int compare(P p1, P p2) {
			return signum(p1.x-p2.x)!=0?signum(p1.x-p2.x):signum(p1.y-p2.y);
		}
	};
	public static  final P O=new P(0,0);
	final double x,y;
	P(double _x,double _y){
		x=_x;y=_y;
	}

	P add(P a){
		return new P(x+a.x,y+a.y);
	}
	P sub(P a){
		return new P(x-a.x,y-a.y);
	}
	P mul(P a){
		return new P(x*a.x-y*a.y,x*a.y+y*a.x);
	}
	P div(P a){
		double d2=a.dist2(O);
		return new P(dot(a,this)/d2,cross(a,this)/d2);
	}

	P conj(){
		return new P(x,-y);
	}

	static double dot(P a,P b){
		return  a.x*b.x+a.y*b.y;
	}

	static double cross(P a,P b){
		return  a.x*b.y-a.y*b.x;
	}

	double dist2(P p){
		return (x-p.x)*(x-p.x)+(y-p.y)*(y-p.y);
	}

	double dist(P p){
		return sqrt(dist2(p));
	}
	public double norm(){
		return dist(O);
	}

	static int ccw(P a,P b,P c){
		b=b.sub(a);c=c.sub(a);
		if(cross(b,c)>EPS)return 1;
		if(cross(b,c)<-EPS)return -1;
		if(dot(b,c)<-EPS)return 2;
		if(b.norm()<c.norm()-EPS)return -2;
		return 0;
	}

	static double arg(P o,P a){
		P dir=a.sub(o);
		double s=acos(dir.x/dir.norm());
		return dir.y>=0?s:2*PI-s;
	}

	static double arg(P a,P b, P c){
		double angleA = P.arg(a,b);
		double angleB = P.arg(b,c);
		double angle =  Math.PI+angleA-angleB;
		if (angle-2*Math.PI>EPS) angle-=2*Math.PI;
		if (angle<EPS) angle+=2*Math.PI;
		return angle;
	}

	P rotate(P o,double arg){
		return o.add(this.sub(o).mul(new P(cos(arg),sin(arg))));
	}

	static double S2(P a,P b,P o){
		return cross(a.sub(o),b.sub(o));
	}
	static double S(P a,P b,P o){
		return S2(a,b,o)/2;
	}

	static P polar(double abs,double arg){
		return new P(abs*cos(arg),abs*sin(arg));
	}

	static P proj(P p,P o){
		return o.mul(new P(dot(p,o)/o.norm(),0));
	}
	public boolean equals(Object obj) {
		if(obj instanceof P){
			P p=(P)obj;
			return signum(x-p.x)==0 && signum(y-p.y)==0;
		}
		return false;
	}
	public String toString(){
		return "("+x+","+y+")";
	}
}
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;

/**
 * http://codeforces.com/contest/174/problem/A
 *
 * @author sultan.of.swing
 *
 */

public class TaskA {

	public FasterScanner mFScanner;
	public PrintWriter mOut;

	public TaskA() {
		mFScanner = new FasterScanner();
		mOut = new PrintWriter(System.out);
	}

	public void solve() {
		int n, m;
		char [][] array;
		int x[], y[];
		int xAns, yAns;

		n = mFScanner.nextInt();
		m = mFScanner.nextInt();

		x = new int[3];
		y = new int[3];

		int k = 0;

		array = mFScanner.nextChar2DArray(n, m);

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (array[i][j] == '*') {
					x[k] = i;
					y[k] = j;
					k++;
				}
			}
		}
		xAns = yAns = 0;

		for (k = 0; k < 3; k++) {
			xAns ^= x[k];
			yAns ^= y[k];
		}

		mOut.print(xAns + 1);
		mOut.print(" ");
		mOut.println(yAns + 1);

	}

	public void flush() {
		mOut.flush();
	}

	public void close() {
		mOut.close();
	}

	public static void main(String[] args) {
		TaskA mSol = new TaskA();
		mSol.solve();
		mSol.flush();
		mSol.close();
	}

	class FasterScanner {
		private InputStream mIs;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FasterScanner() {
			this(System.in);
		}

		public FasterScanner(InputStream is) {
			mIs = is;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = mIs.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public double nextDouble() {
			Double next;
			next = Double.parseDouble(nextString());
			return next;
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public char[] nextCharArray(int N) {
			int i;
			char[] array;
			String str;

			array = new char[N];

			i = 0;

			str = nextLine();

			for (i = 0; i < N && i < str.length(); i++) {
				array[i] = str.charAt(i);
			}

			return array;
		}

		public char[][] nextChar2DArray(int M, int N) {
			int i;
			char[][] array;

			array = new char[M][N];

			i = 0;

			for (i = 0; i < M; i++) {
				array[i] = nextCharArray(N);
			}

			return array;
		}

		public int[] nextIntArray(int N) {
			int i;
			int[] array;

			array = new int[N];

			i = 0;

			for (i = 0; i < N; i++) {
				array[i] = nextInt();
			}

			return array;
		}

		public int[][] nextInt2DArray(int M, int N) {
			int i;
			int[][] array;

			array = new int[M][N];

			i = 0;

			for (i = 0; i < M; i++) {
				array[i] = nextIntArray(N);
			}

			return array;
		}

		public long[] nextLongArray(int N) {
			int i;
			long[] array;

			array = new long[N];

			i = 0;

			for (i = 0; i < N; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public long[][] nextLong2DArray(int M, int N) {
			int i;
			long[][] array;

			array = new long[M][N];

			i = 0;

			for (i = 0; i < M; i++) {
				array[i] = nextLongArray(N);
			}

			return array;
		}

		public double[] nextDoubleArray(int N) {
			int i;
			double[] array;

			array = new double[N];

			for (i = 0; i < N; i++) {
				array[i] = nextDouble();
			}

			return array;
		}

		public double[][] nextDouble2DArray(int M, int N) {
			int i;
			double[][] array;

			array = new double[M][N];

			for (i = 0; i < M; i++) {
				array[i] = nextDoubleArray(N);
			}

			return array;
		}

	}
}


import java.io.*;
import java.util.*;
public class j
{
public static void main(String a[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int m=0,n=0,j=0,k=0,i=0;
int d[]=new int[4];
int e[]=new int[4];
String s;
s=b.readLine();
StringTokenizer c=new StringTokenizer(s);
m=Integer.parseInt(c.nextToken());
n=Integer.parseInt(c.nextToken());
char q[][]=new char[m][n];
String r[]=new String[m];
for(i=0;i<m;i++)
r[i]=b.readLine();
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
q[i][j]=r[i].charAt(j);
}
}
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
if(q[i][j]=='*')
{
d[k]=i+1;
e[k]=j+1;
k++;
}
}
}
if(d[0]==d[1])
d[3]=d[2];
if(d[1]==d[2])
d[3]=d[0];
if(d[0]==d[2])
d[3]=d[1];
if(e[0]==e[1])
e[3]=e[2];
if(e[0]==e[2])
e[3]=e[1];
if(e[1]==e[2])
e[3]=e[0];
System.out.print(d[3]+" "+e[3]);
}
}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
	public static Scanner scan = new Scanner(System.in);
	public static boolean bg = true;

	public static void main(String[] args) throws Exception {
		int n1 = Integer.parseInt(scan.next());
		int n2 = Integer.parseInt(scan.next());
		int[] l1 = null;
		int[] l2 = null;
		int[] l3 = null;
		int p = 0;

		for (int i=0;i<n1;i++){
			char[] temp = scan.next().toCharArray();
			for (int j=0;j<n2;j++){
				if (temp[j]=='*'){
					int[] k1 = {i,j};
					if (p==0){
						l1 =k1;
						p++;
					}
					else if (p==1){
						l2 =k1;
						p++;
					}
					else if (p==2){
						l3 =k1;
						p++;
					}
				}
			}
		}

		if (l1[0]!=l2[0]
				&&l1[1]!=l2[1]
				){
			if (l1[0]!=l3[0]){
				System.out.println((l1[0]+1)+" "+(l2[1]+1));
			}
			else {
				System.out.println((l2[0]+1)+" "+(l1[1]+1));
			}
			System.exit(0);

		}
		else if (l1[0]!=l3[0]
				&&l1[1]!=l3[1]
				){
			if (l1[0]!=l2[0]){
				System.out.println((l1[0]+1)+" "+(l3[1]+1));
			}
			else {
				System.out.println((l3[0]+1)+" "+(l1[1]+1));
			}
			System.exit(0);
		}
		if (l2[0]!=l1[0]){
			System.out.println((l2[0]+1)+" "+(l3[1]+1));
		}
		else {
			System.out.println((l3[0]+1)+" "+(l2[1]+1));
		}
	}
}


import java.util.*;
import java.io.*;

public class A181 implements Runnable {

	public void solve() throws IOException {
		int R = nextInt(); int C = nextInt();
                boolean[] goodRow = new boolean[R];
                boolean[] goodCol = new boolean[C];
                char[][] map = new char[R][];
                for(int i = 0; i < R; i++) map[i] = nextToken().toCharArray();

                for(int i = 0; i < R; i++){
                    for(int j = 0; j < C; j++){
                        if(map[i][j] == '*'){
                            if(!goodRow[i]) goodRow[i] = true;
                            else goodRow[i] = false;
                            if(!goodCol[j]) goodCol[j] = true;
                            else goodCol[j] = false;
                        }
                    }
                }

                int row = -1;
                int col = -1;
                for(int i = 0; i < goodRow.length; i++) if(goodRow[i]) row = i+1;
                for(int i = 0; i < goodCol.length; i++) if(goodCol[i]) col = i+1;

                out.println(row + " " + col);
	}

	//-----------------------------------------------------------
	public static void main(String[] args) {
		new A181().run();
	}

        public void debug(Object... arr){
            System.out.println(Arrays.deepToString(arr));
        }

        public void print1Int(int[] a){
                for(int i = 0; i < a.length; i++)
                        System.out.print(a[i] + " ");
                System.out.println();
        }

        public void print2Int(int[][] a){
                for(int i = 0; i < a.length; i++){
                        for(int j = 0; j < a[0].length; j++){
                                System.out.print(a[i][j] + " ");
                        }
                        System.out.println();
                }
        }

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
			tok = null;
			solve();
			in.close();
                        out.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
        PrintWriter out;
	BufferedReader in;
	StringTokenizer tok;
}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    static char arr[][];
    public static void main(String[] AbuBurghol) throws Exception {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String read[] = in.readLine().split(" ");
        arr = new char[Integer.parseInt(read[0])][Integer.parseInt(read[1])];

        for(int i=0;i<arr.length;++i){
            arr[i]=in.readLine().toCharArray();
        }

        int twoStars = numOfRowHasTwoStars();
        int oneStar = numOfRowHasOnlyOneStar();

        int index[]=new int[2],b=-1;

        for(int i=0;i<arr[twoStars].length;++i){
            if(arr[twoStars][i]=='*'){
                index[++b]=i;
            }
        }

        if(arr[oneStar][index[0]]=='.'){
            System.out.println((oneStar+1)+" "+(index[0]+1));
        } else {
            System.out.println((oneStar+1)+" "+(index[1]+1));
        }

    }

    private static int numOfRowHasTwoStars(){

        for(int i=0;i<arr.length;++i){
            int index=0;
            for(int j=0;j<arr[i].length;++j){
                if(arr[i][j]=='*')
                    ++index;
            }
            if(index==2)
                return i;
        }
        return -1;
    }

    private static int numOfRowHasOnlyOneStar(){

        for(int i=0;i<arr.length;++i){
            int index=0;
            for(int j=0;j<arr[i].length;++j){
                if(arr[i][j]=='*')
                    ++index;
            }
            if(index==1)
                return i;
        }
        return -1;
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

public class CF181A {

	public static void main(String[] args) {
		int r,c,w;
		int[] pr = new int[3];
		int[] cr = new int[3];

		int []a;
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
	    String[] f = null;
		try {
			f = stdin.readLine().split(" ");
		} catch (IOException e) {
		}
		r = Integer.parseInt(f[0]);
		c = Integer.parseInt(f[1]);
		int x=0;
		for(int i=0;i<r;i++){
			String str = null;
			try {
				str = stdin.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			int pos = str.indexOf('*');
			if(pos!=-1){
				pr[x]=i+1;
				cr[x]=pos+1;
				x++;
				if(x==3) break;
			}
			int rpos = str.lastIndexOf('*');
			if(rpos!=pos){
				pr[x]=i+1;
				cr[x]=rpos+1;
				x++;
				if(x==3) break;
			}
		}
		System.out.println((pr[0]+pr[2]-pr[1])+" "+((cr[0]==cr[2])?cr[1]:(cr[1]==cr[2])?cr[0]:cr[2]));
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeSet;
import java.util.Map.Entry;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
     public static void main(String[] args) throws Exception {
          BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

          StringTokenizer st;

          st = new StringTokenizer(in.readLine());

          int n = Integer.parseInt(st.nextToken()),
               m = Integer.parseInt(st.nextToken());

          int x[] = new int[200];
          int y[] = new int[200];

          for (int i = 0 ; i < n ; i++) {
               String s = in.readLine();

               for (int j = 0 ; j < m ; j++) {
                    if (s.charAt(j) == '*') {
                         x[i]++;
                         y[j]++;
                    }
               }
          }

          for (int i = 0 ; i < 200 ; i++) {
               if (x[i] == 1) {
                    System.out.print(i + 1);
               }
          }

          for (int i = 0 ; i < 200 ; i++) {
               if (y[i] == 1) {
                    System.out.println(" " + (i + 1));
               }
          }
     }
}


import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scan = new Scanner(System.in);
		String[] temp =scan.nextLine().split(" ");

		int n = Integer.parseInt(temp[0]);
		int m=Integer.parseInt(temp[1]);

		int row1=-1;
		int row2=-1;

		int col1=-1;
		int col2=-1;

		String [][]matrix=new String[n][m];

		for (int i = 0; i < n; i++) {
			temp=scan.nextLine().split("");
			int counter=0;
			for (int j = 1; j <= m; j++) {
				matrix[i][counter] = (temp[j]);
				counter++;
			}
		}

		int row1Counter=0;
		int row2Counter=0;

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

			for (int j = 0; j < m; j++) {
				if(matrix[i][j].contains("*")){
					if(row1==-1){
						row1=i;
					}else if(row1 != i){
						row2=i;
					}
					if(i==row1){
						row1Counter++;
					}
					if(i==row2){
						row2Counter++;
					}

					if(col1==-1){
						col1=j;
					}else if(col1 != j){
						col2=j;
					}
					if(j==col1){
						col1Counter++;
					}
					if(j==col2){
						col2Counter++;
					}
				}

			}

		}
		/*
		System.out.println("row1= "+row1+",it's Counter= "+row1Counter+", col1= "+col1
				+", its counter= "+col1Counter);
		System.out.println("row2= "+row2+",it's Counter= "+row2Counter+", col2= "+col2
				+", its counter= "+col2Counter);*/
		row1++;col1++;row2++;col2++;
		if(row1Counter==1 && col1Counter==1){
			System.out.println(row1+" "+col1);
		}
		if(row1Counter==1 && col2Counter==1){
			System.out.println(row1+" "+col2);
		}
		if(row2Counter==1 && col1Counter==1){
			System.out.println(row2+" "+col1);
		}
		if(row2Counter==1 && col2Counter==1){
			System.out.println(row2+" "+col2);
		}

	}

}


import java.util.Scanner;

public class P181A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt(); sc.nextLine();
        int[] xs = new int[3];
        int[] ys = new int[3];
        int idx = 0;
        for (int y = 1; y <= n; y++) {
            char[] s = sc.nextLine().toCharArray();
            for (int x = 1; x <= m; x++) {
                if (s[x - 1] == '*') {
                    xs[idx] = x;
                    ys[idx] = y;
                    idx++;
                }
            }
        }
        int x;
        if (xs[0] == xs[1]) {
            x = xs[2];
        } else if (xs[0] == xs[2]) {
            x = xs[1];
        } else {
            x = xs[0];
        }
        int y;
        if (ys[0] == ys[1]) {
            y = ys[2];
        } else if (ys[0] == ys[2]) {
            y = ys[1];
        } else {
            y = ys[0];
        }
        System.out.println(y + " " + x);
    }
}


import java.util.Scanner;

public class A {
    static boolean IsRectangle(int x1, int y1, int x2, int y2, int x3, int y3,
            int x4, int y4) {
        x2 -= x1;
        x3 -= x1;
        x4 -= x1;
        y2 -= y1;
        y3 -= y1;
        y4 -= y1;
        return (x2 + x3 == x4 && y2 + y3 == y4 && x2 * x3 == -y2 * y3)
                || (x2 + x4 == x3 && y2 + y4 == y3 && x2 * x4 == -y2 * y4)
                || (x3 + x4 == x2 && y3 + y4 == y2 && x3 * x4 == -y3 * y4);
    }

    public static void main(String[] args) {
        Scanner r = new Scanner(System.in);

        int n = r.nextInt(), m = r.nextInt();

        char[][] C = new char[n][m];
        for (int i = 0; i < n; i++) {
            String s = r.next();
            C[i] = s.toCharArray();
        }

        for (int i = 0; i < C.length; i++) {
            for (int j = 0; j < C[i].length; j++) {
                if (C[i][j] == '.') {
                    C[i][j] = '*';
                    if (check(C)) {
                        i++;
                        j++;
                        System.out.println(i + " " + j);
                        return;
                    }
                    C[i][j] = '.';
                }
            }
        }
    }

    private static boolean check(char[][] c) {
        int cnt = 0;
        int x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0, x4 = 0, y4 = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = 0; j < c[i].length; j++) {
                if (c[i][j] == '*') {
                    if (cnt == 0) {
                        cnt++;
                        x1 = i;
                        y1 = j;
                    } else if (cnt == 1) {
                        cnt++;
                        x2 = i;
                        y2 = j;
                    } else if (cnt == 2) {
                        cnt++;
                        x3 = i;
                        y3 = j;
                    } else if (cnt == 3) {
                        cnt++;
                        x4 = i;
                        y4 = j;
                    }
                }
            }
        }
        return IsRectangle(x1, y1, x2, y2, x3, y3, x4, y4);
    }
}


import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 * User: Linkov Mikl
 * Date: 20.04.12
 * Time: 18:49
 * To change this template use File | Settings | File Templates.
 */
public class ProblemOne {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int m = scanner.nextInt();
        scanner.nextLine();

        int [] posX = new int[4];
        int [] posY = new int[4];
        int count = 0;

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

            String line = scanner.nextLine();
            for (int j = 0; j < m; j++) {
                if (line.charAt(j) == '*') {
                    posX[count] = i;
                    posY[count] = j;
                    count++;
                }
            }
        }

        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                int f = 0;
                for (int k = 0; k < 3; k++) {
                    if ((posX[i] == posX[k]) && (posY[j] == posY[k])) {
                        f = 1;
                    }
                }
                if (f == 0) {
                    System.out.println((posX[i] + 1) + " " + (posY[j] + 1));
                    return;
                }
            }
        }

    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class CodeD
{
	static class Scanner
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		public String nextLine()
		{
			try
			{
				return br.readLine();
			}
			catch(Exception e)
			{
				throw(new RuntimeException());
			}
		}

		public String next()
		{
			while(!st.hasMoreTokens())
			{
				String l = nextLine();
				if(l == null)
					return null;
				st = new StringTokenizer(l);
			}
			return st.nextToken();
		}

		public int nextInt()
		{
			return Integer.parseInt(next());
		}

		public long nextLong()
		{
			return Long.parseLong(next());
		}

		public double nextDouble()
		{
			return Double.parseDouble(next());
		}

		public int[] nextIntArray(int n)
		{
			int[] res = new int[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextInt();
			return res;
		}

		public long[] nextLongArray(int n)
		{
			long[] res = new long[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextLong();
			return res;
		}

		public double[] nextDoubleArray(int n)
		{
			double[] res = new double[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextDouble();
			return res;
		}
		public void sortIntArray(int[] array)
		{
			Integer[] vals = new Integer[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public void sortLongArray(long[] array)
		{
			Long[] vals = new Long[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public void sortDoubleArray(double[] array)
		{
			Double[] vals = new Double[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public String[] nextStringArray(int n)
		{
			String[] vals = new String[n];
			for(int i = 0; i < n; i++)
				vals[i] = next();
			return vals;
		}

		Integer nextInteger()
		{
			String s = next();
			if(s == null)
				return null;
			return Integer.parseInt(s);
		}

		int[][] nextIntMatrix(int n, int m)
		{
			int[][] ans = new int[n][];
			for(int i = 0; i < n; i++)
				ans[i] = nextIntArray(m);
			return ans;
		}

		static <T> T fill(T arreglo, int val)
		{
			if(arreglo instanceof Object[])
			{
				Object[] a = (Object[]) arreglo;
				for(Object x : a)
					fill(x, val);
			}
			else if(arreglo instanceof int[])
				Arrays.fill((int[]) arreglo, val);
			else if(arreglo instanceof double[])
				Arrays.fill((double[]) arreglo, val);
			else if(arreglo instanceof long[])
				Arrays.fill((long[]) arreglo, val);
			return arreglo;
		}
	}

	static int count(ArrayList <Integer> arreglo, int v)
	{
		int c = 0;
		for(int i : arreglo) if(i == v) c++;
		return c;
	}

	public static void main(String[] args)
	{
		Scanner sc = new Scanner();
		int n = sc.nextInt();
		int m = sc.nextInt();
		char[][] mapa = new char[n][];
		for(int i = 0; i < n; i++)
			mapa[i] = sc.next().toCharArray();
		ArrayList <Integer> filas = new ArrayList <Integer> ();
		ArrayList <Integer> columnas = new ArrayList <Integer> ();
		for(int i = 0; i < n; i++)
			for(int j = 0; j < m; j++)
			{
				if(mapa[i][j] == '*')
				{
					filas.add(i + 1);
					columnas.add(j + 1);
				}
			}
		int filaR = 0;
		int columaR = 0;
		for(int i : filas)
		{
			if(count(filas, i) == 1)
				filaR = i;
		}
		for(int i : columnas)
		{
			if(count(columnas, i) == 1)
				columaR = i;
		}
		System.out.println(filaR + " " + columaR);
	}
}


import java.io.PrintStream;
import java.util.Scanner;
import java.io.PrintWriter;

public class Main
{
	 static String get(String a[])
	{
	   int d1=0,d2=0;
	   loop:for(int i=0;i<3;i++){
	    for(int j=0;j<3;j++){
	    String first1=a[i].substring(0,a[i].indexOf(',')),first2=a[j].substring(0,a[j].indexOf(','));
	   if(first1.equals(first2)) continue;
	   else{
	     String last1=a[i].substring(a[i].indexOf(',')+1,a[i].length()),last2=a[j].substring(a[j].indexOf(',')+1,a[j].length());
	   if(last1.equals(last2)) continue;
	   else{
	    d1=i; d2=j; break loop;
	    }
	   }
	  }
  }
	 String x1y2=a[d1].substring(0,a[d1].indexOf(','))+a[d2].substring(a[d2].indexOf(','),a[d2].length()), x2y1=a[d2].substring(0,a[d2].indexOf(','))+a[d1].substring(a[d1].indexOf(','),a[d1].length());

boolean checker=false;
for(int i=0;i<3;i++)
if(a[i].equals(x1y2)){ checker=true; break; }
if(checker) return x2y1;
else return x1y2;
	}

	public static void main (String[] args)
	{ Scanner obj=new Scanner(System.in);
	PrintWriter out=new PrintWriter(new PrintStream(System.out));
	int n=Integer.parseInt(obj.next()),m=Integer.parseInt(obj.next());
	char a[][]=new char[n][m];
	String b[]=new String[3]; int counter=0;
	loop:for(int i=0;i<n;i++){
	String s=obj.next();
	for(int j=0;j<m;j++){
	a[i][j]=s.charAt(j);
	if(a[i][j]=='*'){
	if(counter<b.length){
	 b[counter]=Integer.toString(i+1)+","+Integer.toString(j+1); counter++;
	  }
	else break loop;
	}
	 }
	} obj.close();

	out.println(new String(get(b)).replace(","," "));
	out.close();
		}
}


import java.util.Scanner;
import java.io.PrintWriter;
import java.io.PrintStream;
public class Main
{
	public static void main (String[] args)
	{ Scanner obj=new Scanner(System.in);
	PrintWriter out=new PrintWriter(new PrintStream(System.out));
	int n=Integer.parseInt(obj.next()),m=Integer.parseInt(obj.next());
	char a[][]=new char[n][m];
	String b[]=new String[3]; int counter=0;
	loop:for(int i=0;i<n;i++){
	String s=obj.next();
	for(int j=0;j<m;j++){
	a[i][j]=s.charAt(j);
	if(a[i][j]=='*'){
	if(counter<b.length){
	 b[counter]=Integer.toString(i+1)+","+Integer.toString(j+1); counter++;
	  }
	else break loop;
	}
	 }
	} obj.close();

	out.println(new String(get(b)));
	out.close();
		}

	 static String get(String a[])
	{
	   int d1=0,d2=0;
	   loop:for(int i=0;i<3;i++){
	    for(int j=0;j<3;j++){
	    String first1=a[i].substring(0,a[i].indexOf(',')),first2=a[j].substring(0,a[j].indexOf(','));
	   if(first1.equals(first2)) continue;
	   else{
	     String last1=a[i].substring(a[i].indexOf(',')+1,a[i].length()),last2=a[j].substring(a[j].indexOf(',')+1,a[j].length());
	   if(last1.equals(last2)) continue;
	   else{
	    d1=i; d2=j; break loop;
	    }
	   }
	  }
  }
	 String x1y2=a[d1].substring(0,a[d1].indexOf(','))+a[d2].substring(a[d2].indexOf(','),a[d2].length()), x2y1=a[d2].substring(0,a[d2].indexOf(','))+a[d1].substring(a[d1].indexOf(','),a[d1].length());

boolean checker=false;
for(int i=0;i<3;i++)
if(a[i].equals(x1y2)){ checker=true; break; }
if(checker) return x2y1;
else return x1y2;
}
}


import java.util.*;
public class SeriesOfCrimes {
    public static void main(String[] args) {
        Scanner leer = new Scanner(System.in);
        int n = leer.nextInt();
        int m = leer.nextInt();
        leer.nextLine();
        char[][] map = new char[n][m];
        int row1=0, row2=0;
        for (int i = 0; i < n; i++) {
            int cont = 0;
            map[i] = leer.nextLine().toCharArray();
            for (int j = 0; j < map[i].length; j++) {
                if(map[i][j] == '*'){
                    cont++;
                }
            }
            if(cont==1)
                row1 = i;
            if(cont==2)
                row2 = i;
        }
        solve(map, row1, row2);
    }
    public static void solve(char[][] map, int row1, int row2){
        for (int i = 0; i < map[row1].length; i++) {
            if(map[row1][i] != map[row2][i]){
                if(map[row1][i]=='.')
                    System.out.println((row1+1)+" "+(i+1));
                else
                    System.out.println((row2+1)+" "+(i+1));
            }
        }
    }
}


import java.io.*;
import java.util.*;

public class Pr181A {
	public static void main(String[] args) throws IOException {
		new Pr181A().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out, true);
		solve();
		out.flush();
	}

	void solve() throws IOException {
		int n = nextInt();
		int m = nextInt();
		int[] x = new int[n];
		int[] y = new int[m];
		for (int i = 0; i < n; i++) {
			String s = nextToken();
			for (int j = 0; j < m; j++) {
				if (s.charAt(j) == '*') {
					x[i]++;
					y[j]++;
				}
			}
		}
		for (int i = 0; i < n; i++) {
			if (x[i] == 1) {
				out.print((i + 1) + " ");
			}
		}
		for (int i = 0; i < m; i++) {
			if (y[i] == 1) {
				out.println((i + 1) + " ");
			}
		}
	}
}


import java.io.*;
import java.util.*;

public class SeriesOfCrimes {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(f.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int[] x = new int[3];
        int[] y = new int[3];
        int index = 0;
        for (int i = 0; i < n; i++)
        {
            String str = f.readLine();
            for (int j = 0; j < m; j++)
                if (str.charAt(j) == '*')
                {
                    x[index] = i;
                    y[index] = j;
                    index++;
                }
        }
        int xf = x[0];
        if (x[0] == x[1])
            xf = x[2];
        if (x[0] == x[2])
            xf = x[1];
        int yf = y[0];
        if (y[0] == y[1])
            yf = y[2];
        if (y[0] == y[2])
            yf = y[1];
        System.out.println((xf+1)+" "+(yf+1));
    }
}


import java.util.Scanner;

public class Main {
	public static void main(String args[]){
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int m = input.nextInt();
		char a[][] = new char[n][m];
		for(int i = 0;i < n;i++){
			String str = input.next();
			for(int j = 0; j < m;j++){
				a[i][j] = str.charAt(j);
			}
		}

		int count = 0;
		int x = 0,y = 0;
		boolean found = false;
		//horizontal check
		for(int i = 0;i < n;i++){
			for(int j = 0; j < m;j++){
				if(a[i][j] == '*'){
					++count;
				}
			}
			found = count == 1 ? true : false;
			if(found){
				x = i;
				found = false;
				//break;
			}
			count = 0;
		}

		//vertical check
		for(int i = 0;i < m;i++){
			for(int j = 0; j < n;j++){
				if(a[j][i] == '*'){
					++count;
				}
			}
			found = count == 1 ? true : false;
			if(found){
				y = i;
				found = false;
			    //break;
			}
			count = 0;
		}

		System.out.println((x+1) + " " + (y+1));
	}
}


import java.io.*;
import java.util.*;

public class test
{

	public static void main(String[] args)
	{
		new test().run();
	}

	PrintWriter out = null;

	HashMap<Integer, Integer> rows = new HashMap<Integer, Integer>();
	HashMap<Integer, Integer> columns = new HashMap<Integer, Integer>();

	void run()
	{
		Scanner in = new Scanner(System.in);
		out = new PrintWriter(System.out);

		int n = in.nextInt();
		int m = in.nextInt();

		char[][] mat = new char[n][];
		for (int i = 0; i < n; i++)
			mat[i] = in.next().toCharArray();

		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++)
				if (mat[i][j] == '*')
				{
					if (!rows.containsKey(i))
						rows.put(i, 0);

					rows.put(i, rows.get(i) + 1);

					if (!columns.containsKey(j))
						columns.put(j, 0);

					columns.put(j, columns.get(j) + 1);
				}

		int x = -1;
		int y = -1;

		for (int i : rows.keySet())
		{
			if (rows.get(i) == 1)
			{
				x = i + 1;
				break;
			}
		}

		for (int i : columns.keySet())
		{
			if (columns.get(i) == 1)
			{
				y = i + 1;
				break;
			}
		}

		out.println(x + " " + y);
		out.close();
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	/**
	 * @param args
	 * @throws IOException
	 * @throws NumberFormatException
	 */
	public static void main(String[] args) throws NumberFormatException, IOException {
		new Main().run();
	}

	private StringTokenizer input;
	private BufferedReader reader;

	private static class Point {
		int x;
		int y;

		Point(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public String toString() {
			return "(" + x + "; " + y + ")";
		}
	}

	private void run() throws NumberFormatException, IOException {
		openInput(null);

		int n = nextInt();
		int m = nextInt();

		Point[] p = new Point[3];
		int pc = 0;

		bigLoop:
		for (int row = 0; row < n; row++) {
			char[] s = next().toCharArray();
			for (int col = 0; col < m; col++) {
				if (s[col] == '*') {
					p[pc++] = new Point(row + 1, col + 1);
				}
				if (pc == 3) {
					break bigLoop;
				}
			}
		}

		int row;
		if (p[0].x == p[1].x) {
			row = p[2].x;
		} else if (p[0].x == p[2].x) {
			row = p[1].x;
		} else {
			row = p[0].x;
		}

		int col;
		if (p[0].y == p[1].y) {
			col = p[2].y;
		} else if (p[0].y == p[2].y) {
			col = p[1].y;
		} else {
			col = p[0].y;
		}

		System.out.print(row);
		System.out.print(" ");
		System.out.print(col);

		closeInput();
	}

	private void openInput(String fileName) {
		reader = new BufferedReader(new InputStreamReader(System.in));
	}

	private void closeInput() {
		try {
			reader.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private String next() throws IOException {
		while (input == null || !input.hasMoreTokens()) {
			input = new StringTokenizer(reader.readLine());
		}
		return input.nextToken();
	}

	@SuppressWarnings("unused")
	private long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(next());
	}

	@SuppressWarnings("unused")
	private int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(next());
	}

	@SuppressWarnings("unused")
	private double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(next());
	}

}


import java.util.Scanner;

public class Crime{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String str = stdIn.nextLine();
		String[] s = new String[2];
		s = str.split(" ");
		int a = Integer.parseInt(s[0]);
		int b = Integer.parseInt(s[1]);

		String[] data = new String[a];
		for(int i = 0; i < a; i++){
			data[i] = stdIn.nextLine();
		}
		int[][] x = new int[3][2];
		int count = 0;
		for(int i = 0; i < a; i++){
			int sum = 0;
			for(int j = 0; j < b; j++){
				if( data[i].charAt(j) == '*' ){
					sum++;
				}
			}
			if( sum == 0 ){
				continue;
			}
			else if( sum == 1 ){
				x[count][0] = i;
				x[count][1] = data[i].indexOf('*');
				count++;
			}
			else if( sum == 2 ){
				x[count][0] = i;
				x[count][1] = data[i].indexOf('*');
				x[count+1][0] = i;
				x[count+1][1] = data[i].lastIndexOf('*');
				count += 2;
			}
			if( count == 3 ){
				break;
			}
		}

		int resultX;
		int resultY;

		if( x[0][1] == x[1][1] ){
			resultX = x[0][0];
			resultY = x[2][1];
		}
		else if( x[0][1] > x[1][1] ){
			resultX = x[0][0];
			resultY = x[1][1];
		}
		else{
			resultX = x[2][0];
			resultY = x[1][1];
		}

		System.out.println((resultX+1) + " " + (resultY+1));
	}
}


import java.util.Scanner;

public class Crime{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String str = stdIn.nextLine();
		String[] s = new String[2];
		s = str.split(" ");
		int a = Integer.parseInt(s[0]);
		int b = Integer.parseInt(s[1]);

		String[] data = new String[a];
		for(int i = 0; i < a; i++){
			data[i] = stdIn.nextLine();
		}
		int[][] x = new int[3][2];
		int count = 0;
		for(int i = 0; i < a; i++){
			int sum = 0;
			for(int j = 0; j < b; j++){
				if( data[i].charAt(j) == '*' ){
					sum++;
				}
			}
			if( sum == 0 ){
				continue;
			}
			else if( sum == 1 ){
				x[count][0] = i;
				x[count][1] = data[i].indexOf('*');
				count++;
			}
			else if( sum == 2 ){
				x[count][0] = i;
				x[count][1] = data[i].indexOf('*');
				x[count+1][0] = i;
				x[count+1][1] = data[i].lastIndexOf('*');
				count += 2;
			}
			if( count == 3 ){
				break;
			}
		}

		int resultX;
		int resultY;

		if( x[0][1] == x[1][1] ){
			resultX = x[0][0];
			resultY = x[2][1];
		}
		else if( x[0][1] > x[1][1] ){
			resultX = x[0][0];
			resultY = x[1][1];
		}
		else{
			resultX = x[2][0];
			if( x[2][1] == x[1][1] ){
				resultY = x[0][1];
			}
			else{
			resultY = x[1][1];
			}
		}

		System.out.println((resultX+1) + " " + (resultY+1));
	}
}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.ArrayList;

public class Main {

	static String[] g = new String[200];
	public static void main(String[] args) throws IOException {
		BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer token = new StringTokenizer(cin.readLine());
		int h = Integer.parseInt(token.nextToken());
		int w = Integer.parseInt(token.nextToken());
		ArrayList<Point> v =new ArrayList<Point>();
		for (int i = 0; i < h; i++) {
			g[i] = cin.readLine();
			for (int j = 0; j < w; j++) {
				if(g[i].charAt(j)=='*')
					v.add(new Point(i, j));
			}
		}
		int r,c;
		if(v.get(0).x == v.get(1).x)
	        r = v.get(2).x;
	    else if(v.get(0).x == v.get(2).x)
	        r = v.get(1).x;
	    else
	        r = v.get(0).x;

	    if(v.get(0).y == v.get(1).y)
	        c = v.get(2).y;
	    else if(v.get(0).y== v.get(2).y)
	        c = v.get(1).y;
	    else
	        c = v.get(0).y;

		System.out.println((r+1) + " " + (c+1));
	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Vector;

public class Main {

	static String[] g = new String[200];
	public static void main(String[] args) throws IOException {
		BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer token = new StringTokenizer(cin.readLine());
		int h = Integer.parseInt(token.nextToken());
		int w = Integer.parseInt(token.nextToken());
		Vector<Point> v =new Vector<Point>();
		for (int i = 0; i < h; i++) {
			g[i] = cin.readLine();
			for (int j = 0; j < w; j++) {
				if(g[i].charAt(j)=='*')
					v.add(new Point(i, j));
			}
		}
		int r,c;
		if(v.get(0).x == v.get(1).x)
	        r = v.get(2).x;
	    else if(v.get(0).x == v.get(2).x)
	        r = v.get(1).x;
	    else
	        r = v.get(0).x;

	    if(v.get(0).y == v.get(1).y)
	        c = v.get(2).y;
	    else if(v.get(0).y== v.get(2).y)
	        c = v.get(1).y;
	    else
	        c = v.get(0).y;

		System.out.println((r+1) + " " + (c+1));
	}

}


import java.io.*;
import java.util.*;

public class p181a
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        System.out.println();
        String str = "*";
        int x[] = new int[4];
        int y[] = new int[4];
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = 0;
        for(int i=1;i<=n;i++)
        {
            String s = sc.next();
            for(int j=1;j<=m;j++)
            {
                String S = Character.toString(s.charAt(j-1));
                if(S.equalsIgnoreCase(str))
                {
                    x[c] = i;
                    y[c] = j;
                    c++;
                    if(c==3) break;
                }
            }
        }
        if(x[0]==x[1]) x[3]=x[2];
        else if(x[0]==x[2]) x[3]=x[1];
        else x[3]=x[0];
        if(y[0]==y[1]) y[3]=y[2];
        else if(y[0]==y[2]) y[3]=y[1];
        else y[3]=y[0];
        System.out.println(x[3]+" "+y[3]);
    }
}


import java.util.Arrays;
import java.util.Scanner;

    public class Test {
            public static void main(String args[]){
            	Scanner input = new Scanner(System.in);
                    int row = input.nextInt();
                    int col = input.nextInt();
                    String[] map = new String[row];
                    for(int i = 0 ; i < row ; i++){
                    		map[i] = input.next();
                    }
                    maximum(row,col,map);
            }

          public static void maximum(int row,int col,String[] map){
        	  int[] x = new int[3];
        	  int[] y = new int[3];
        	  int lx = -1;
        	  int ly = -1;
        	  int count = 0;
        	  for(int i = 0 ; i < map.length ; i++){
        		  for(int j = 0 ; j < map[i].length(); j++){
        			  if(map[i].charAt(j) == '*'){
        				  x[count] = j;
        				  y[count] = i;
        				  count++;
        			  }
        		  }
        	  }
        	  Arrays.sort(x);
        	  Arrays.sort(y);
        	  if(x[0] == x[1]){
        		  lx = x[2];
        	  }else{
        		  lx = x[0];
        	  }
        	  if(y[0] == y[1]){
        		  ly = y[2];
        	  }else{
        		  ly = y[0];
        	  }
        	  System.out.println((ly+1)+" "+(lx+1));
          }
    }


import java.util.Scanner;

public class P181A_SeriesOfCrimes {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();

		@SuppressWarnings("unused")
		int m = scanner.nextInt();

		String input = "";
		int[] x = new int[4], y = new int[4];
		int index = 0, indexStar;

		for (int i = 0; i < n; i++) {
			input = scanner.next();
			indexStar = input.indexOf('*');

			while (indexStar > -1) {
				x[index] = i;
				y[index] = indexStar;
				index++;

				indexStar = input.indexOf('*', indexStar + 1);
			}
		}

		scanner.close();

		if (x[0] == x[1]) {
			x[3] = x[2];
		} else if (x[0] == x[2]) {
			x[3] = x[1];
		} else {
			x[3] = x[0];
		}

		if (y[0] == y[1]) {
			y[3] = y[2];
		} else if (y[0] == y[2]) {
			y[3] = y[1];
		} else {
			y[3] = y[0];
		}

		System.out.println((x[3] + 1) + " " + (y[3] + 1));
	}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Series_of_Crimes {

    static int []linhas = new int[100];
    static int []colunas = new int[100];
    static int pontos[][] = new int[3][2];
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    public static void main(String[] args) {
        try {
            int contador = 0;
            String linha = reader.readLine();
            int  n = Integer.parseInt(linha.split("\\s+")[0]);
            int  m = Integer.parseInt(linha.split("\\s+")[1]);

            for (int i = 0; i < n && contador < 3 ; i++) {
                linha = reader.readLine();
                for (int j = 0; j < m && contador < 3; j++) {
                    if (linha.charAt(j) == '*') {
                        pontos[contador][0] = i;
                        pontos[contador][1] = j;
                        contador++;
                    }
                }
            }
            if (pontos[0][0] == pontos[1][0]) {
                pontos[2][0]++;
                System.out.print(pontos[2][0]);
            } else if (pontos[0][0] == pontos[2][0]) {
                pontos[1][0]++;
                System.out.print(pontos[1][0]);
            } else {
                pontos[0][0]++;
                System.out.print(pontos[0][0]);
            }
            System.out.print(" ");

            if (pontos[0][1] == pontos[1][1]) {
                pontos[2][1]++;
                System.out.println(pontos[2][1]);
            } else if (pontos[0][0] == pontos[2][1]) {
                pontos[1][1]++;
                System.out.println(pontos[1][1]);
            } else {
                pontos[0][1]++;
                System.out.println(pontos[0][1]);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Series_of_Crimes {

    static int []linhas = new int[100];
    static int []colunas = new int[100];
    static int pontos[][] = new int[3][2];
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    public static void main(String[] args) {
        try {
            int contador = 0;
            String linha = reader.readLine();
            int  n = Integer.parseInt(linha.split("\\s+")[0]);
            int  m = Integer.parseInt(linha.split("\\s+")[1]);

            for (int i = 0; i < n && contador < 3 ; i++) {
                linha = reader.readLine();
                for (int j = 0; j < m && contador < 3; j++) {
                    if (linha.charAt(j) == '*') {
                        pontos[contador][0] = i;
                        pontos[contador][1] = j;
                        contador++;
                    }
                }
            }
            if (pontos[0][0] == pontos[1][0]) {
                pontos[2][0]++;
                System.out.print(pontos[2][0]);
            } else if (pontos[0][0] == pontos[2][0]) {
                pontos[1][0]++;
                System.out.print(pontos[1][0]);
            } else {
                pontos[0][0]++;
                System.out.print(pontos[0][0]);
            }
            System.out.print(" ");

            if (pontos[0][1] == pontos[1][1]) {
                pontos[2][1]++;
                System.out.println(pontos[2][1]);
            } else if (pontos[0][1] == pontos[2][1]) {
                pontos[1][1]++;
                System.out.println(pontos[1][1]);
            } else {
                pontos[0][1]++;
                System.out.println(pontos[0][1]);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


import java.util.Scanner;
import java.util.StringTokenizer;

public class SeriesofCrimes {
	public static void main(String args[]) {
		new SeriesofCrimes();
	}

	public SeriesofCrimes() {
		Scanner in = new Scanner(System.in);
		int m, n;
		String line;
		line = in.nextLine();
		StringTokenizer st = new StringTokenizer(line);
		m = Integer.parseInt(st.nextToken());
		n = Integer.parseInt(st.nextToken());
		int r1x = -1, r2x = -1, r3x = -1;
		int r1y = -1, r2y = -1, r3y = -1;
		for (int i = 0; i < m; i++) {
			line = in.nextLine();
			for (int j = 0; j < n; j++) {
				if (line.charAt(j) == '*') {
					if (r1x == -1) {
						r1x = i;
						r1y = j;
					} else if (r2x == -1) {
						r2x = i;
						r2y = j;
					} else if (r3x == -1) {
						r3x = i;
						r3y = j;
					}
				}
			}
		}
		int r4x, r4y;
		if (r1y == r3y && r2x == r3x) {
			r4x = r1x;
			r4y = r2y;
		} else if (r1y == r2y && r2x == r3x) {
//			System.out.println("#2");
			r4x = r1x;
			r4y = r3y;
		} else if (r1x == r2x && r2y == r3y) {
//			System.out.println("#3");
			r4x = r3x;
			r4y = r1y;
		} else {
//			System.out.println("#4";/
			r4x = r3x;
			r4y = r2y;
		}
		r4x++;
		r4y++;
		System.out.print(r4x + " " + r4y);
	}
}