#include <bits/stdc++.h>
using namespace std;
const int INF = 1e8;
const int MAXN = 100000;
void solve() {
  vector<string> v(8);
  for (int i = 0; i < 8; ++i) cin >> v[i];
  int minA = 10;
  for (int j = 0; j < 8; ++j) {
    int curA = 0;
    while (curA < 8 && v[curA][j] == '.') curA++;
    if (curA < 8 && v[curA][j] == 'W') minA = min(minA, curA);
  }
  int minB = 10;
  for (int j = 0; j < 8; ++j) {
    int curB = 7;
    while (curB >= 0 && v[curB][j] == '.') curB--;
    if (curB >= 0 && v[curB][j] == 'B') minB = min(minB, 8 - curB - 1);
  }
  if (minA <= minB)
    cout << 'A';
  else
    cout << 'B';
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  solve();
  return 0;
}
