#include <bits/stdc++.h>
using namespace std;
void yala_bena() {
  cin.tie(0);
  std::ios::sync_with_stdio(0);
}
const int m_r = 2000006;
double pii = 3.1415926536;
int main() {
  yala_bena();
  string s[9];
  for (long long i = 1; i <= 8; ++i) cin >> s[i];
  long long ma = 100;
  long long mb = 100, j, i;
  for (j = 0; j < 8; j++) {
    for (i = 1; i <= 8; i++) {
      if (s[i][j] == 'W') {
        ma = min(ma, i - 1);
        break;
      } else if (s[i][j] == 'B') {
        break;
      }
    }
    for (long long i = 8; i > 0; i--) {
      if (s[i][j] == 'B') {
        mb = min(mb, 8 - i);
        break;
      } else if (s[i][j] == 'W')
        break;
    }
  }
  if (ma <= mb)
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
