#include <bits/stdc++.h>
using namespace std;
char board[8][8];
int maxblack = -1;
int minwhite = 8;
int currentblack;
int currentwhite;
bool checkcolumn(int i, int j) {
  for (int p = 0; p < i; p++) {
    if (board[p][j] != '.') return false;
  }
  return true;
}
bool checkbcolumn(int i, int j) {
  for (int p = i + 1; p < 8; p++) {
    if (board[p][j] != '.') return false;
  }
  return true;
}
void findmin() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (board[i][j] == 'W') {
        if (i <= minwhite && checkcolumn(i, j)) {
          minwhite = i;
          currentwhite = j;
        }
      } else if (board[i][j] == 'B') {
        if (maxblack < i && checkbcolumn(i, j)) {
          maxblack = i;
          currentblack = j;
        }
      }
    }
  }
}
int main() {
  int noanswer = 0;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> board[i][j];
    }
  }
  findmin();
  if ((7 - maxblack) < minwhite)
    cout << "B";
  else
    cout << "A";
  return 0;
}
