#include <bits/stdc++.h>
using namespace std;
char str[8][8];
int main() {
  while (scanf("%s", str[0]) != EOF) {
    for (int i = 1; i < 8; i++) scanf("%s", str[i]);
    int Mina = 0x3f3f3f3f, Minb = 0x3f3f3f3f;
    for (int i = 0; i < 8; i++) {
      for (int j = 0; j < 8; j++) {
        if (str[i][j] == 'W') {
          bool flag = true;
          for (int k = i - 1; k >= 0; k--) {
            if (str[k][j] != '.') {
              flag = false;
              break;
            }
          }
          if (flag) Mina = min(Mina, i);
        }
        if (str[i][j] == 'B') {
          bool flag = true;
          for (int k = i + 1; k < 8; k++) {
            if (str[k][j] != '.') {
              flag = false;
              break;
            }
          }
          if (flag) Minb = min(Minb, 8 - i - 1);
        }
      }
    }
    if (Mina <= Minb)
      printf("A\n");
    else
      printf("B\n");
  }
  return 0;
}
