#include <bits/stdc++.h>
using namespace std;
bool flagb[9][9];
bool flagw[9][9];
int dpb = 10000;
int dpw = 10000;
int main() {
  char a[9][9];
  for (int i = 1; i <= 8; i++)
    for (int j = 1; j <= 8; j++) {
      cin >> a[i][j];
      if (a[i][j] == 'W')
        for (int p = i - 1; p > 0; p--) flagb[p][j] = true;
      if (a[i][j] == 'B')
        for (int p = i + 1; p < 9; p++) flagw[p][j] = true;
    }
  for (int i = 1; i <= 8; i++)
    for (int j = 1; j <= 8; j++) {
      if (a[i][j] == 'W' and !flagw[i][j]) dpw = min(dpw, i);
      if (a[i][j] == 'B' and !flagb[i][j]) dpb = min(dpb, 8 - i + 1);
    }
  if (dpb < dpw)
    cout << 'B';
  else
    cout << 'A';
}
