#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
char pp[10][10];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = (0); i < (8); ++i) cin >> pp[i];
  int cW = INT_MAX / 3, cB = INT_MAX / 3;
  for (int i = (0); i < (8); ++i) {
    for (int j = (0); j < (8); ++j) {
      if (pp[i][j] == 'W') {
        int p = i, fl = 0;
        while (p > 0) {
          p--;
          if (pp[p][j] != '.') fl = 1;
        }
        if (fl == 0) cW = min(cW, i);
      } else if (pp[i][j] == 'B') {
        int p = i, fl = 0;
        while (p < 7) {
          p++;
          if (pp[p][j] != '.') fl = 1;
        }
        if (fl == 0) cB = min(cB, 7 - i);
      }
    }
  }
  if (cW <= cB)
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
