#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
inline T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return a * (b / gcd(a, b));
}
string arr[8];
bool f[8], f1[8];
int main() {
  memset(f, false, sizeof(f));
  memset(f1, false, sizeof(f1));
  int B = 8, A = 8;
  int i;
  for (i = (int)0; i < (int)8; ++i) {
    cin >> arr[i];
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (arr[j][i] == 'B') f[i] = true;
      if (arr[j][i] == 'W' && !f[i]) {
        B = min(B, j);
      }
    }
    for (int j = 7; j >= 0; j--) {
      if (arr[j][i] == 'W') f1[i] = true;
      if (arr[j][i] == 'B' && !f1[i]) {
        A = min(A, 7 - j);
      }
    }
  }
  if (B <= A)
    printf("A");
  else
    printf("B");
  return 0;
}
