#include <bits/stdc++.h>
using namespace std;
long long mx = 0, mn = 1e9 + 7;
bool bysec(const pair<long long, long long> &a,
           const pair<long long, long long> &b) {
  return a.second < b.second;
}
string inst(string s) {
  char ch[100000];
  scanf("%s", ch);
  s = ch;
  return s;
}
void pfst(string s) {
  long long n = s.size();
  for (long long i = 0; i < n; i++) printf("%c", s[i]);
}
bool strfind(string &st, string &s) {
  long long m = s.length(), n = st.length(), i, j;
  for (i = 0; i <= n - m; i++) {
    for (j = 0; j < m; j++)
      if (st[i + j] != s[j]) break;
    if (j == m) return 1;
  }
  return 0;
}
map<char, long long> mp;
vector<long long> row, col;
int main() {
  long long n, m, k = 0;
  scanf("%lld", &n), scanf("%lld", &m);
  char ch;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      cin >> ch;
      if (ch == 'B') {
        k++;
        row.push_back(i);
        col.push_back(j);
      }
    }
  }
  k /= 2;
  printf("%lld", row[k]), printf("%s", " "), printf("%lld", col[k]),
      printf("%s", "\n");
  return 0;
}
