#include <bits/stdc++.h>
int main() {
  int i, j, k, mina = 7, minb = 7;
  char x[8][8];
  for (i = 0; i < 8; i++) scanf("%s", x[i]);
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++) {
      if (x[i][j] == 'W') {
        int clear = 1;
        for (k = i - 1; k >= 0; k--)
          if (x[k][j] != '.') clear = 0;
        if (clear != 0) mina = mina < i ? mina : i;
      }
      if (x[i][j] == 'B') {
        int clear = 1;
        for (k = i + 1; k < 8; k++)
          if (x[k][j] != '.') clear = 0;
        if (clear != 0) minb = minb < (7 - i) ? minb : (7 - i);
      }
    }
  printf("%c\n", mina <= minb ? 'A' : 'B');
  return 0;
}
