#include <bits/stdc++.h>
using namespace std;
struct st {
  int x;
  int y;
};
bool fun(const st &a, const st &b) { return a.x < b.x; }
int main() {
  char a[10][10];
  int minb = 1000, minw = 1000, i, j, k, flag;
  for (i = 0; i < 8; i++) cin >> a[i];
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (a[i][j] == 'W') {
        flag = 0;
        for (k = i - 1; k >= 0; k--) {
          if (a[k][j] != '.') {
            flag = 1;
            break;
          }
        }
        if (flag == 0) minw = min(minw, i);
      } else if (a[i][j] == 'B') {
        flag = 0;
        for (k = i + 1; k < 8; k++) {
          if (a[k][j] != '.') {
            flag = 1;
            break;
          }
        }
        if (flag == 0) minb = min(minb, 8 - i - 1);
      }
    }
  }
  if (minb < minw)
    cout << "B";
  else
    cout << "A";
  return 0;
}
