#include <bits/stdc++.h>
using namespace std;
vector<string> mat;
map<pair<int, vector<string> >, bool> memo;
bool check(int at) {
  for (int i = 0; i < 8; i++) {
    if (at && mat[7][i] == 'B')
      return true;
    else if (!at && mat[0][i] == 'W')
      return true;
  }
  return false;
}
int solve(int at) {
  if (check(at)) return true;
  if (memo.count(make_pair(at, mat))) return memo[make_pair(at, mat)];
  char op[] = {'W', 'B'};
  int sinal = (at == 1) ? (1) : (-1);
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (mat[i][j] == op[at]) {
        int k = i + sinal;
        bool ok = true;
        int alvo = (at) ? (8) : (-1);
        while (k != alvo) {
          if (mat[k][j] == op[1 - at]) {
            ok = false;
            break;
          }
          k += sinal;
        }
        if (ok && i + sinal != alvo && mat[i + sinal][j] == '.') {
          mat[i][j] = '.';
          mat[i + sinal][j] = op[at];
          bool ret = solve(1 - at);
          if (!ret) memo[make_pair(at, mat)] = true;
          mat[i + sinal][j] = '.';
          mat[i][j] = op[at];
          if (!ret) return true;
        }
      }
    }
  }
  return memo[make_pair(at, mat)] = false;
}
int main() {
  ios::sync_with_stdio(false);
  for (int i = 0; i < 8; i++) {
    string aux = "";
    cin >> aux;
    mat.push_back(aux);
  }
  cout << (solve(0) ? ('A') : ('B')) << '\n';
  return 0;
}
