#include <bits/stdc++.h>
using namespace std;
char chess[8][8];
int white[64][2];
int black[64][2];
int main() {
  int whiteSize = 0;
  int blackSize = 0;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      scanf(" %c", &chess[i][j]);
      if (chess[i][j] == 'W') {
        white[whiteSize][0] = i;
        white[whiteSize][1] = j;
        whiteSize++;
      } else if (chess[i][j] == 'B') {
        black[blackSize][0] = i;
        black[blackSize][1] = j;
        blackSize++;
      }
    }
  }
  int Wt = 99, Bt = 99;
  bool small = true;
  for (int i = 0; i < whiteSize; i++) {
    for (int j = 0; j < white[i][0]; j++) {
      if (chess[j][white[i][1]] == 'B') {
        small = false;
        break;
      }
    }
    if (small) {
      Wt = white[i][0];
      break;
    }
    small = true;
  }
  for (int i = blackSize - 1; i >= 0; i--) {
    for (int j = black[i][0] + 1; j < 8; j++) {
      if (chess[j][black[i][1]] == 'W') {
        small = false;
        break;
      }
    }
    if (small) {
      Bt = 7 - black[i][0];
      break;
    }
    small = true;
  }
  if (Wt <= Bt)
    printf("A");
  else
    printf("B");
  return 0;
}
