#include <bits/stdc++.h>
using namespace std;
char Map[10][10];
int A[70], B[70];
int main() {
  int i, j, k, m, n, mark;
  for (i = 0; i < 8; i++) scanf("%s", Map[i]);
  n = 8;
  m = 8;
  mark = 0;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (Map[i][j] == 'W') {
        k = i;
        while (1) {
          if (Map[k][j] == 'B') break;
          if (k == 0) {
            mark = 1;
            n = i;
            break;
          }
          k--;
        }
      }
      if (mark == 1) break;
    }
    if (mark == 1) break;
  }
  mark = 0;
  for (i = 7; i >= 0; i--) {
    for (j = 0; j < 8; j++) {
      if (Map[i][j] == 'B') {
        k = i;
        while (1) {
          if (Map[k][j] == 'W') break;
          if (k == 7) {
            mark = 1;
            m = 7 - i;
            break;
          }
          k++;
        }
      }
      if (mark == 1) break;
    }
    if (mark == 1) break;
  }
  if (n <= m)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
