#include <bits/stdc++.h>
using namespace std;
char field[8][8];
int main() {
  int y = 0, x = 0;
  char tmp;
  for (y = 0; y < 8; y++) {
    for (x = 0; x < 8; x++) {
      scanf("%c", &tmp);
      field[x][y] = tmp;
    }
    if (y < 7) scanf("\n");
  }
  int minA, minB;
  minA = minB = 9;
  for (int i = 0; i < 8; i++) {
    for (y = 0; y < 8; y++) {
      if (field[i][y] == 'W') {
        minA = min(minA, y);
        break;
      } else if (field[i][y] == 'B') {
        break;
      }
    }
    for (y = 8 - 1; y >= 0; y--) {
      if (field[i][y] == 'B') {
        minB = min(minB, 7 - y);
        break;
      } else if (field[i][y] == 'W') {
        break;
      }
    }
  }
  if (minA <= minB)
    printf("A");
  else
    printf("B");
}
