#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[8][8];
  int A = 1e6, B = 1e6;
  for (int i = 0; i < 8; i++) cin >> a[i];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (a[j][i] == 'W')
        A = min(A, j);
      else if (a[j][i] == 'B')
        break;
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 7; j >= 0; j--) {
      if (a[j][i] == 'B')
        B = min(B, 7 - j);
      else if (a[j][i] == 'W')
        break;
    }
  }
  if (A <= B)
    cout << 'A';
  else
    cout << 'B';
  return 0;
}
