#include <bits/stdc++.h>
using namespace std;
const int N6 = 1e6 + 6, N3 = 1e3 + 6, oo = 1e9 + 9;
char a[111][111];
bool u1[111], u2[111];
int answ = oo, ansb = oo;
int main() {
  ios_base ::sync_with_stdio(0);
  for (int i = 1; i <= 8; ++i) {
    for (int j = 1; j <= 8; ++j) {
      cin >> a[i][j];
      if (a[i][j] == 'W' && !u1[j]) {
        answ = min(answ, i - 1);
      }
      if (a[i][j] != '.') {
        u1[j] = 1;
      }
    }
  }
  for (int i = 8; i >= 1; --i) {
    for (int j = 1; j <= 8; ++j) {
      if (!u2[j] && a[i][j] == 'B') {
        ansb = min(ansb, 8 - i);
      }
      if (a[i][j] != '.') u2[j] = 1;
    }
  }
  if (answ <= ansb)
    cout << "A";
  else
    cout << "B";
  return 0;
}
