#include <bits/stdc++.h>
using namespace std;
char s[9][9];
int main() {
  int i, j, a[9], b[9], c[9], d[9];
  for (i = 1; i <= 8; i++) {
    a[i] = 9, b[i] = 0, c[i] = 0, d[i] = 9;
  }
  for (i = 1; i <= 8; i++) {
    for (j = 1; j <= 8; j++) {
      cin >> s[i][j];
      if (s[i][j] == 'W') {
        a[j] = min(a[j], i);
        b[j] = max(a[j], i);
      } else if (s[i][j] == 'B') {
        d[j] = min(d[j], i);
        c[j] = max(c[j], i);
      }
    }
  }
  int x = 10, y = 10;
  for (i = 1; i <= 8; i++) {
    if (a[i] < d[i]) {
      x = min(x, a[i] - 1);
    }
    if (b[i] < c[i]) {
      y = min(y, 8 - c[i]);
    }
  }
  if (x <= y)
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
