#include <bits/stdc++.h>
using namespace std;
long long arr[1234][1234];
long long n, m, K, M;
vector<pair<int, int> > v[303];
long long sum[305];
bool check(int k, int i, int j) {
  if (i + k >= n || i - k < 0 || k + j >= m || j - k < 0) return false;
  if (arr[i][j] + arr[i + k][j] + arr[i - k][j] + arr[i][j + k] +
          arr[i][j - k] ==
      5)
    return true;
  return false;
}
void solve() {
  int i, j;
  M = min(n, m);
  int k;
  for (k = 1; k < 301; k++) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        if (check(k, i, j)) {
          v[k].push_back(pair<int, int>(i, j));
        }
      }
    }
    sum[k] = sum[k - 1] + v[k].size();
  }
}
long long bin_search(int x) {
  long long lo = 1;
  long long hi = 305;
  long long ans = 1233;
  while (lo <= hi) {
    long long mid = (lo + hi) >> 1;
    if (sum[mid] >= x) {
      hi = mid - 1;
      ans = min(ans, mid);
    } else {
      lo = mid + 1;
    }
  }
  return ans;
}
void calc() {
  int i, j;
  long long ans = 0;
  int x = bin_search(K);
  int S = K - sum[x - 1];
  cout << 1 + v[x][S - 1].first << " " << 1 + v[x][S - 1].second << endl;
  cout << 1 + v[x][S - 1].first - x << " " << 1 + v[x][S - 1].second << endl;
  cout << 1 + v[x][S - 1].first + x << " " << 1 + v[x][S - 1].second << endl;
  cout << 1 + v[x][S - 1].first << " " << 1 + v[x][S - 1].second - x << endl;
  cout << 1 + v[x][S - 1].first << " " << 1 + v[x][S - 1].second + x << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> m >> K;
  int i, j;
  for (i = 0; i < n; i++) {
    string str;
    cin >> str;
    for (j = 0; j < m; j++) {
      if (str[j] == '*') arr[i][j] = 1;
    }
  }
  solve();
  if (K > sum[M]) {
    cout << "-1\n";
    return 0;
  }
  calc();
  return 0;
}
