#include <bits/stdc++.h>
using namespace std;
string s[8];
int fai[8][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 0; i < 8; i++) cin >> s[i];
  int bw = 8;
  int bb = 8;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[i][j] == 'B')
        fai[j][0] = 1;
      else if (s[i][j] == 'W' && !fai[j][0])
        bw = i;
    }
    if (bw == i) break;
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[7 - i][j] == 'W')
        fai[j][1] = 1;
      else if (s[7 - i][j] == 'B' && !fai[j][1])
        bb = i;
    }
    if (bb == i) break;
  }
  if (bb < bw)
    cout << "B\n";
  else
    cout << "A\n";
}
