#include <bits/stdc++.h>
using namespace std;
char M[8][8];
int flag[8];
int MINW, MAXB;
void fun(int x) {
  int minw = 8;
  int maxb = -1;
  int i;
  for (i = 0; i < 8; i++) {
    if (M[i][x] == 'W') {
      minw = min(minw, i);
    }
    if (M[i][x] == 'B') {
      maxb = max(maxb, i);
    }
  }
  for (i = minw - 1; i >= 0; i--) {
    if (M[i][x] == 'B') minw = 8;
  }
  for (i = maxb + 1; i < 8; i++) {
    if (M[i][x] == 'W') maxb = -1;
  }
  MINW = min(MINW, minw);
  MAXB = max(MAXB, maxb);
}
int main() {
  int i, j;
  memset(flag, 0, sizeof(flag));
  MINW = 8;
  MAXB = -1;
  for (i = 0; i < 8; i++) {
    scanf("%s", M[i]);
  }
  for (i = 0; i < 8; i++) {
    fun(i);
  }
  if (MINW <= 7 - MAXB)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
