#include <bits/stdc++.h>
using namespace std;
char a[9][9];
int A = 10;
int B = 10;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  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 good = true;
        for (int ii = 1; ii < i; ii++) {
          if (a[ii][j] != '.') {
            good = false;
          }
        }
        if (good) {
          A = min(A, i - 1);
        }
      } else if (a[i][j] == 'B') {
        bool good = true;
        for (int ii = i + 1; ii <= 8; ii++) {
          if (a[ii][j] != '.') {
            good = false;
          }
        }
        if (good) {
          B = min(B, 8 - i);
        }
      }
    }
  }
  if (A <= B) {
    cout << "A";
  } else {
    cout << "B";
  }
  return 0;
}
