#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, b, w;
  char g[9][9];
  for (i = 1; i <= 8; i++) {
    for (j = 1; j <= 8; j++) {
      cin >> g[i][j];
    }
  }
  int mx = 0, mn = 9;
  for (i = 1; i <= 8; i++) {
    for (j = 1; j <= 8; j++) {
      int bflag = 0, wflag = 0;
      if (g[i][j] == 'B') {
        for (int k = i + 1; k <= 8; k++) {
          if (g[k][j] == 'W') {
            bflag = 1;
            break;
          }
        }
        if (bflag != 1) {
          mx = max(mx, i);
          b = 8 - mx;
        }
      } else if (g[i][j] == 'W') {
        for (int k = i - 1; k >= 1; k--) {
          if (g[k][j] == 'B') {
            wflag = 1;
            break;
          }
        }
        if (wflag != 1) {
          mn = min(mn, i);
          w = mn - 1;
        }
      }
    }
  }
  if (b < w)
    cout << 'B';
  else
    cout << 'A';
  return 0;
}
