#include <bits/stdc++.h>
using namespace std;
int main() {
  char A[10][10];
  for (int i = 0; i < 8; i++) scanf("%s", A[i]);
  int wmin = 10, bmin = 10;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (A[j][i] == 'B')
        break;
      else if (A[j][i] == 'W')
        wmin = min(wmin, j);
    }
    for (int j = 7; j >= 0; j--) {
      if (A[j][i] == 'W')
        break;
      else if (A[j][i] == 'B')
        bmin = min(bmin, 7 - j);
    }
  }
  if (bmin < wmin)
    cout << "B\n";
  else
    cout << "A\n";
  return 0;
}
