#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k;
  char c;
  char white[8] = {0, 0, 0, 0, 0, 0, 0, 0};
  char black[8] = {0, 0, 0, 0, 0, 0, 0, 0};
  for (i = 0; i < 8; i++) {
    scanf("\n");
    for (j = 0; j < 8; j++) {
      scanf("%c", &c);
      if (c == 'W') {
        if (white[j] == 0) {
          if (black[j] > 0) {
            white[j] = 8;
            black[j] = 8;
          } else {
            white[j] = i;
          }
        }
      } else if (c == 'B') {
        black[j] = 8 - i - 1;
      }
    }
  }
  char minW = 8, minB = 8;
  for (i = 0; i < 8; i++) {
    if (white[i] > 0 && white[i] < minW) {
      minW = white[i];
    }
    if (black[i] > 0 && black[i] < minB) {
      minB = black[i];
    }
  }
  if (minB < minW) {
    printf("B");
  } else {
    printf("A");
  }
  return 0;
}
