#include <bits/stdc++.h>
using namespace std;
int seen[8];
char last[8];
int when[8];
int main() {
  int miniW = 10, miniB = 10;
  for (int i = 0; i < 8; i++) {
    char str[9];
    scanf("%s", str);
    for (int j = 0; j < 8; j++) {
      if (str[j] == 'W' && seen[j] == 0) {
        miniW = min(miniW, i);
      }
      if (str[j] == 'B') {
        seen[j] = 1;
      }
      if (str[j] != '.') {
        last[j] = str[j];
        when[j] = i;
      }
    }
  }
  for (int j = 0; j < 8; j++) {
    if (last[j] == 'B') miniB = min(miniB, 7 - when[j]);
  }
  if (miniW <= miniB)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
