#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  char field[10][10];
  int uw, lw, ub, lb, answ = 8, ansb = 8;
  for (int i = 0; i < (8); i++) {
    for (int j = 0; j < (8); j++) {
      cin >> field[i][j];
    }
  }
  for (int i = 0; i < (8); i++) {
    uw = 7, lw = 0, ub = 7, lb = 0;
    for (int j = 0; j < (8); j++) {
      if (field[j][i] == 'B') {
        ub = min(ub, j);
        lb = max(lb, j);
      }
      if (field[j][i] == 'W') {
        uw = min(uw, j);
        lw = max(lw, j);
      }
    }
    if (uw < ub) answ = min(answ, uw);
    if (lb > lw) ansb = min(ansb, 7 - lb);
  }
  if (answ <= ansb)
    cout << 'A' << endl;
  else
    cout << 'B' << endl;
  return 0;
}
