#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[8];
  for (long long i = 0; i < 8; i++) cin >> s[i];
  long long am = INT_MAX;
  long long bm = INT_MAX;
  for (long long i = 1; i < 7; i++) {
    for (long long j = 0; j < 8; j++) {
      if (s[i][j] == 'B') {
        long long k;
        for (k = i + 1; k <= 7; k++) {
          if (s[k][j] == 'W') {
            k = 10;
            break;
          }
        }
        if (k != 10) {
          bm = min(bm, 7 - i);
        }
      }
    }
  }
  for (long long i = 6; i > 0; i--) {
    for (long long j = 0; j < 8; j++) {
      if (s[i][j] == 'W') {
        long long k;
        for (k = i - 1; k >= 0; k--) {
          if (s[k][j] == 'B') {
            k = 10;
            break;
          }
        }
        if (k != 10) {
          am = min(am, i);
        }
      }
    }
  }
  if (am < bm)
    cout << "A\n";
  else if (bm < am)
    cout << "B\n";
  else
    cout << "A\n";
  return 0;
}
