#include <bits/stdc++.h>
using namespace std;
using llint = long long;
using pii = pair<int, int>;
int main() {
  int minA = 10, minB = 10;
  char a[10][10];
  for (int i = 1; i <= 8; i++)
    for (int j = 1; j <= 8; ++j) {
      cin >> a[i][j];
    }
  for (int i = 1; i <= 8; i++)
    for (int j = 1; j <= 8; j++) {
      if (a[i][j] == 'W') {
        bool ok = true;
        for (int k = 1; k < i; k++)
          if (a[k][j] == 'B') ok = false;
        if (ok) minA = min(minA, i - 1);
      } else if (a[i][j] == 'B') {
        bool ok = true;
        for (int k = i + 1; k <= 8; k++)
          if (a[k][j] == 'W') ok = false;
        if (ok) minB = min(minB, 8 - i);
      }
    }
  if (minB < minA)
    cout << 'B';
  else
    cout << 'A';
}
