#include <bits/stdc++.h>
long long mpow(long long a, long long n, long long mod) {
  long long ret = 1;
  long long b = a;
  while (n) {
    if (n & 1) ret = (ret * b) % mod;
    b = (b * b) % mod;
    n >>= 1;
  }
  return (long long)ret;
}
using namespace std;
using namespace std;
char a[9][9];
int main() {
  int i, j;
  for (i = 0; i < 8; i++) cin >> a[i];
  int disa = 1e5, disb = 1e5;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (a[i][j] == 'B') {
        int x = i;
        int ok = 1;
        x++;
        while (x < 8) {
          if (a[x][j] != '.') {
            ok = 0;
            break;
          }
          x++;
        }
        if (ok) {
          disb = min(disb, 7 - i);
        }
      } else if (a[i][j] == 'W') {
        int x = i;
        int ok = 1;
        x--;
        while (x >= 0) {
          if (a[x][j] != '.') {
            ok = 0;
            break;
          }
          x--;
        }
        if (ok) {
          disa = min(disa, i);
        }
      }
    }
  }
  if (disa == 100000 || disa == 100000) {
    if (disa == 100000)
      cout << "B";
    else
      cout << "A";
  } else if (disa == 0 || disb == 0) {
    if (disa == 0)
      cout << "A";
    else
      cout << "B";
  } else {
    while (true) {
      disa--;
      if (disa == 0) break;
      disb--;
      if (disb == 0) break;
    }
    if (disa == 0)
      cout << "A";
    else
      cout << "B";
  }
  return 0;
}
