#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  vector<pair<int, int> > coor;
  string c;
  cin >> a >> b;
  for (int i = 0; i < a; i++) {
    cin >> c;
    for (int y = 0; y < c.length(); y++) {
      if (c[y] == 'B') {
        coor.push_back(make_pair(i + 1, y + 1));
      }
    }
  }
  cout << coor[(coor.size() / 2)].first << " "
       << coor[(coor.size() / 2)].second;
}
