#include <bits/stdc++.h>
char s[113][113];
int main() {
  for (int i = 0; i < 8; i++) {
    scanf("%s", &s[i]);
  }
  int Astep = 8, Bstep = 8;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[i][j] == 'W') {
        bool issolution = true;
        for (int k = 0; k < i; k++) {
          if (s[k][j] != '.') {
            issolution = false;
          }
        }
        if (issolution) Astep = Astep > i ? i : Astep;
      }
      if (s[i][j] == 'B') {
        bool issolution = true;
        for (int k = i + 1; k < 8; k++) {
          if (s[k][j] != '.') {
            issolution = false;
          }
        }
        if (issolution) Bstep = Bstep > 7 - i ? 7 - i : Bstep;
      }
    }
  }
  if (Astep <= Bstep)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
