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