#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.tie(0);
  int white = 8, black = 8;
  string a[8];
  bool fine;
  for (int i = 0; i < 8; i++) cin >> a[i];
  for (int j = 0; j < 8; j++) {
    fine = false;
    for (int i = 0; i < 8 && !fine; i++)
      if (a[i][j] != '.') {
        fine = true;
        if (a[i][j] == 'W') white = min(white, i);
      }
  }
  for (int j = 0; j < 8; j++) {
    fine = false;
    for (int i = 7; i >= 0 && !fine; i--)
      if (a[i][j] != '.') {
        fine = true;
        if (a[i][j] == 'B') black = min(black, 7 - i);
      }
  }
  if (black < white)
    cout << "B";
  else
    cout << "A";
  return 0;
}
