#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, m = 0, n, cnt = 0, x = 0, ans = 0, y, sum = 0, l = 0,
                         r = 0;
  cin >> n >> m;
  string a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        for (k = j; k < m; k++) {
          if (a[i][k] == 'B') {
            cnt++;
          } else {
            break;
          }
        }
        cnt = cnt / 2;
        i += cnt;
        j += cnt;
        i++;
        j++;
        cout << i << " " << j;
        return 0;
      }
    }
  }
}
