#include <bits/stdc++.h>
using namespace std;
void solve(void);
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
void solve(void) {
  vector<string> board(8);
  for (int i = 0; i < 8; i++) {
    cin >> board[i];
  }
  int ansW = INT_MAX, ansB = -INT_MAX;
  for (int i = 0; i < 8; i++) {
    int posW = INT_MAX;
    for (int j = 0; j < 8; j++) {
      if (board[j][i] == 'W') {
        posW = j;
        break;
      } else if (board[j][i] == 'B') {
        break;
      }
    }
    if (posW != INT_MAX) {
      ansW = min(ansW, posW);
    }
  }
  for (int i = 0; i < 8; i++) {
    int posB = -INT_MAX;
    for (int j = 7; j >= 0; j--) {
      if (board[j][i] == 'W') {
        break;
      } else if (board[j][i] == 'B') {
        posB = j;
        break;
      }
    }
    if (posB != -INT_MAX) ansB = max(ansB, posB);
  }
  if (ansW <= 7 - ansB)
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
