#include <bits/stdc++.h>
using namespace std;
int A[9], B[9];
int main() {
  string str[9];
  int Wmin = 10, Bmin = 10;
  for (int j = 1; j < 9; j++) {
    cin >> str[j];
  }
  for (int j = 1; j < 9; j++) {
    for (int i = 0; i < 8; i++) {
      if (str[j][i] == 'W' && A[i] == 0) {
        Wmin = j;
        goto hell;
      }
      if (str[j][i] == 'B') A[i] = 1;
    }
  }
hell:
  for (int j = 8; j > 0; j--) {
    for (int i = 0; i < 8; i++) {
      if (str[j][i] == 'B' && B[i] == 0) {
        Bmin = 9 - j;
        goto heaven;
      }
      if (str[j][i] == 'W') B[i] = 1;
    }
  }
heaven:
  Wmin <= Bmin ? cout << 'A' : cout << 'B';
  cout << endl;
  return 0;
}
