#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
template <typename T>
T gcd(T a, T b) {
  T c;
  while (b) {
    c = b;
    b = a % b;
    a = c;
  }
  return a;
}
template <typename T>
T powmod(T a, T b) {
  T res = 1;
  a %= mod;
  while (b) {
    if (b & 1) res = res * (a % mod);
    a = a * (a % mod);
    b >>= 1;
  }
  return res;
}
void Solve() {
  int n, m;
  cin >> n >> m;
  char grid[120][120];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> grid[i][j];
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (grid[i][j] == 'B') {
        if (j + 1 == m) {
          cout << i + 1 << " " << j + 1 << '\n';
          return;
        } else {
          int k;
          for (k = j + 1; k < m; ++k) {
            if (grid[i][k] != 'B') break;
          }
          int a = k - j + 1;
          cout << i + (a / 2) << " " << j + (a / 2) << '\n';
          return;
        }
      }
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  Solve();
}
