#include <bits/stdc++.h>
using namespace std;
void program() {
  vector<vector<char>> v(8, vector<char>(8));
  for (auto &i : v) {
    for (auto &j : i) cin >> j;
    cin >> ws;
  }
  long long a = 10;
  long long b = 10;
  for (long long i = 0; i < 8; i++) {
    long long at = 10;
    long long bt = 10;
    bool blockw = false;
    for (long long j = 0; j < 8; j++) {
      if (v[j][i] == 'W') {
        bt = 10;
        if (!blockw) at = min(at, j);
      }
      if (v[j][i] == 'B') {
        blockw = true;
        bt = min(bt, 8 - j - 1);
      }
    }
    a = min(at, a);
    b = min(bt, b);
  }
  cout << (a <= b ? "A" : "B");
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  bool first = true;
  while (cin && !cin.eof()) {
    if (first)
      first = false;
    else
      cout << endl << endl;
    program();
    cin >> ws;
  }
  return 0;
}
