#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1677721600")
using namespace std;
const double EPS = 1E-9;
int main() {
  char m[10][10];
  for (int i = 1; i <= (int)8; i++)
    for (int j = 1; j <= (int)8; j++) cin >> m[i][j];
  int white = 100;
  int black = 100;
  for (int i = 1; i <= (int)8; i++)
    for (int j = 1; j <= (int)8; j++) {
      if (m[i][j] == 'W') {
        bool fail = 0;
        for (int k = i - 1; k > 0; k--)
          if (m[k][j] == 'B') fail = 1;
        if (!fail) white = min(white, i - 1);
      }
      if (m[i][j] == 'B') {
        bool fail = 0;
        for (int k = i + 1; k <= 8; k++)
          if (m[k][j] == 'W') fail = 1;
        if (!fail) black = min(black, 8 - i);
      }
    }
  if (white <= black)
    cout << "A";
  else
    cout << "B";
  return 0;
}
