#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[10][10];
  for (int i = 0; i < 8; i++) {
    scanf("%s", str[i]);
  }
  int ansBlack = -1;
  int ansWhite = 10;
  for (int i = 0; i < 8; i++) {
    int black = -1;
    int white = 10;
    for (int j = 0; j < 8; j++) {
      if (str[j][i] == 'B') {
        black = max(black, j);
      } else if (str[j][i] == 'W') {
        white = min(white, j);
      }
    }
    bool blackFlag = true;
    bool whiteFlag = true;
    if (black != -1) {
      for (int j = black + 1; j < 8; j++) {
        if (str[j][i] == 'W') {
          blackFlag = false;
          break;
        }
      }
      if (blackFlag) ansBlack = max(black, ansBlack);
    }
    if (white != 10) {
      for (int j = white - 1; j >= 0; j--) {
        if (str[j][i] == 'B') {
          whiteFlag = false;
          break;
        }
      }
      if (whiteFlag) ansWhite = min(white, ansWhite);
    }
  }
  if (ansBlack == -1) {
    printf("A");
    return 0;
  }
  if (ansWhite == 10) {
    printf("B");
    return 0;
  }
  ansWhite++;
  ansBlack++;
  ansBlack = 8 - ansBlack;
  ansWhite--;
  if (ansWhite <= ansBlack) {
    printf("A");
  } else
    printf("B");
  return 0;
}
