#include <bits/stdc++.h>
using namespace std;
int n, m;
char a[100][100];
int main() {
  int r, k, i, c = 0, x = 0, y = 0, j, t, l, z, x1 = 0, y1 = 0, bm = 1000100,
               wm = 1000100;
  long long ans = 0;
  string p;
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++) cin >> a[i][j];
  for (j = 0; j < 8; j++) {
    for (i = 0; i < 8; i++) {
      if (a[i][j] == 'B') {
        c = 0;
        for (k = i + 1; k < 8; k++) {
          if (a[k][j] != '.') c = 1;
        }
        if (!c) {
          bm = min(bm, 7 - i);
        }
      } else if (a[i][j] == 'W') {
        c = 0;
        for (k = 0; k < i; k++) {
          if (a[k][j] != '.') c = 1;
        }
        if (!c) {
          wm = min(wm, i);
        }
      }
    }
  }
  if (bm < wm) {
    cout << "B";
  } else
    cout << "A";
  printf("\n");
  ;
  return 0;
}
