#include <bits/stdc++.h>
int map[105][105];
int main() {
  int i, j, min1, min2, flag1, flag2;
  char ch;
  memset(map, -1, sizeof(map));
  for (i = 1; i <= 8; i++) {
    for (j = 1; j <= 8; j++) {
      scanf("%c", &ch);
      if (ch == 'W')
        map[i][j] = 1;
      else if (ch == 'B')
        map[i][j] = 0;
    }
    getchar();
  }
  min1 = 10000;
  min2 = 10000;
  for (i = 1; i <= 8; i++) {
    for (j = 1; j <= 8; j++) {
      if (map[i][j] == 1) {
        int k = i;
        flag1 = 0;
        for (k = i - 1; k >= 1; k--) {
          if (map[k][j] == 0 || map[k][j] == 1) {
            flag1 = 1;
          }
        }
        if (flag1 == 0) {
          if (min1 > i - 1) min1 = i - 1;
        }
      }
      if (map[i][j] == 0) {
        int k2 = i;
        flag2 = 0;
        for (k2 = i + 1; k2 <= 8; k2++) {
          if (map[k2][j] == 0 || map[k2][j] == 1) flag2 = 1;
        }
        if (flag2 == 0) {
          if (min2 > 8 - i) min2 = 8 - i;
        }
      }
    }
  }
  if (min1 > min2)
    printf("B");
  else
    printf("A");
  return 0;
}
