#include <bits/stdc++.h>
using namespace std;
char G[10][10];
bool fW[10][10] = {0}, fB[10][10] = {0};
int main() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) scanf("%c", &G[i][j]);
    getchar();
  }
  for (int i = 1; i < 8; i++) {
    for (int j = 0; j < 8; j++)
      if (fW[i - 1][j] || G[i - 1][j] != '.') fW[i][j] = true;
  }
  for (int i = 6; i >= 0; i--) {
    for (int j = 0; j < 8; j++)
      if (fB[i + 1][j] || G[i + 1][j] != '.') fB[i][j] = true;
  }
  int w = 10, b = 10;
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) {
      if (G[i][j] == 'W' && fW[i][j] == false) w = min(w, i);
      if (G[i][j] == 'B' && fB[i][j] == false) b = min(b, 7 - i);
    }
  if (w <= b)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
