#include <bits/stdc++.h>
using namespace std;
int i, j, v[10][10], rb[9][2], ra[9][2], minb, minw, a, b, ok, k;
char c;
int main() {
  minw = 9999;
  for (i = 1; i <= 8; i++)
    for (j = 1; j <= 8; j++) {
      cin >> c;
      if (c == '.')
        v[i][j] = 0;
      else if (c == 'B')
        v[i][j] = 1;
      else if (c == 'W')
        v[i][j] = 2;
    }
  for (i = 1; i <= 8; i++) {
    for (j = 1; j <= 8; j++) {
      if (v[i][j] == 1) {
        ok = 1;
        for (k = i + 1; k <= 8 && ok; k++)
          if (v[k][j] != 0) ok = 0;
        if (ok == 1) {
          rb[j][0] = 1;
          rb[j][1] = i;
        }
      }
      if (v[i][j] == 2) {
        ok = 1;
        for (k = i - 1; k > 0 && ok; k--)
          if (v[k][j] != 0) ok = 0;
        if (ok == 1) {
          ra[j][0] = 1;
          ra[j][1] = i;
        }
      }
    }
  }
  for (i = 1; i <= 8; i++) {
    if (ra[i][0]) minw = min(minw, ra[i][1]);
    if (rb[i][0]) minb = max(minb, rb[i][1]);
  }
  if (minw <= 9 - minb)
    cout << 'A';
  else
    cout << 'B';
  return 0;
}
