#include <bits/stdc++.h>
using namespace std;
int main() {
  char board[8][8];
  int minA = 999999, minB = 999999;
  for (int i = 0; i < 8; i++) {
    string row;
    getline(cin, row);
    board[0][i] = row[0];
    board[1][i] = row[1];
    board[2][i] = row[2];
    board[3][i] = row[3];
    board[4][i] = row[4];
    board[5][i] = row[5];
    board[6][i] = row[6];
    board[7][i] = row[7];
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (board[j][i] == 'W') {
        bool noWay = false;
        for (int y = 0; y < i; y++) noWay = board[j][y] != '.' || noWay;
        if (!noWay) minA = min(minA, i);
      } else if (board[j][i] == 'B') {
        bool noWay = false;
        for (int y = i + 1; y < 8; y++) noWay = board[j][y] != '.' || noWay;
        if (!noWay) minB = min(minB, 7 - i);
      }
    }
  }
  cout << (minA <= minB ? 'A' : 'B');
}
