#include <bits/stdc++.h>
using namespace std;
int X, Y;
char C[10][10];
int main() {
  X = Y = 100;
  for (int i = 1; i < 9; i++) scanf("%s", C[i] + 1);
  for (int j = 1; j < 9; j++) {
    int A, B;
    A = B = 100;
    for (int i = 1; i < 9; i++)
      if (C[i][j] == 'W') {
        if (A == 100 && B == 100) A = i - 1;
        B = 101;
      } else if (C[i][j] == 'B')
        B = 8 - i;
    X = min(A, X);
    Y = min(B, Y);
  }
  if (X <= Y)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
