#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > AdjList;
char board[10][10];
bool clearRoadA(int r, int c) {
  for (int i = r; i >= 0; i--) {
    if (board[i][c] == 'B') return false;
  }
  return true;
}
bool clearRoadB(int r, int c) {
  for (int i = r; i < 8; i++) {
    if (board[i][c] == 'W') return false;
  }
  return true;
}
int As() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (board[i][j] == 'W' && clearRoadA(i, j)) return i;
    }
  }
  return 9999999;
}
int Bs() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (board[7 - i][j] == 'B' && clearRoadB(7 - i, j)) return i;
    }
  }
  return 9999999;
}
int main() {
  for (int i = 0; i < 8; i++) cin >> board[i];
  if (As() <= Bs())
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
