#include <bits/stdc++.h>
using namespace std;
char T[10][10];
int main() {
  vector<pair<int, int> > A, B;
  for (int i = 0; i < 8; i++) {
    scanf("%s", T[i]);
    for (int j = 0; j < 8; j++) {
      if (T[i][j] == 'W')
        A.push_back(make_pair(i, j));
      else if (T[i][j] == 'B')
        B.push_back(make_pair(i, j));
    }
  }
  int disA = (1 << 30), disB = (1 << 30);
  for (int i = 0; i < A.size(); i++) {
    bool ok = true;
    for (int j = A[i].first - 1; j >= 0; j--)
      if (T[j][A[i].second] != '.') ok = false;
    if (ok) disA = min(disA, A[i].first);
  }
  for (int i = 0; i < B.size(); i++) {
    bool ok = true;
    for (int j = B[i].first + 1; j < 8; j++)
      if (T[j][B[i].second] != '.') ok = false;
    if (ok) disB = min(disB, 7 - B[i].first);
  }
  if (disA <= disB)
    puts("A");
  else
    puts("B");
}
