#include <bits/stdc++.h>
int min(int a, int b) { return a > b ? b : a; }
int main() {
  char s[10][10];
  while (scanf("%s", s[0]) == 1) {
    for (int i = 1; i < 8; i++) scanf("%s", s[i]);
    int i, j;
    int A, B, had[9] = {0};
    A = B = 1e9;
    for (i = 0; i < 8; i++)
      for (j = 0; j < 8; j++) {
        if (s[i][j] == 'W' && !had[j]) A = min(A, i);
        if (s[i][j] == 'B') had[j] = 1;
      }
    memset(had, 0, sizeof(had));
    for (i = 8 - 1; i >= 0; i--)
      for (j = 0; j < 8; j++) {
        if (s[i][j] == 'B' && !had[j]) B = min(B, 8 - i - 1);
        if (s[i][j] == 'W') had[j] = 1;
      }
    if (A <= B)
      printf("A\n");
    else
      printf("B\n");
  }
}
