#include <bits/stdc++.h>
using namespace std;
int visitedA[9];
int visitedB[9];
char board[9][9];
int main() {
  memset(visitedA, -1, sizeof(visitedA));
  memset(visitedB, -1, sizeof(visitedB));
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      char c;
      cin.get(c);
      board[i][j] = c;
      if (board[i][j] == 'W') visitedA[j] = i;
      if (board[i][j] == 'B')
        if (visitedB[j] == -1) visitedB[j] = i;
    }
    cin.get();
  }
  int x1, x2;
  bool ok = false;
  for (int i = 0; i < 8 && !ok; i++)
    for (int j = 0; j < 8 && !ok; j++) {
      if (board[i][j] == 'W')
        if (visitedB[j] != -1) {
          if (visitedB[j] > i) {
            x1 = i;
            ok = true;
          }
        } else {
          x1 = i;
          ok = true;
        }
    }
  ok = false;
  for (int i = 7; i >= 0 && !ok; i--)
    for (int j = 0; j < 8 && !ok; j++) {
      if (board[i][j] == 'B')
        if (visitedA[j] != -1) {
          if (visitedA[j] < i) {
            x2 = i;
            ok = true;
          }
        } else {
          x2 = i;
          ok = true;
        }
    }
  if (x1 == (7 - x2)) cout << "A" << endl;
  if (x1 > (7 - x2)) cout << "B" << endl;
  if ((7 - x2) > x1) cout << "A" << endl;
}
