#include <bits/stdc++.h>
std::string B[8];
int r, c, m, n = 8, x, y;
int main() {
  for (; m < 8; std::cin >> B[m++])
    ;
  for (; c < 8; c++)
    for (x = y = r = 0; r < 8; r++)
      !y &&r < m ? B[r][c] > 86 ? m = r : y = B[r][c] > 65 : 0,
                                  !x && r < n ? B[7 - r][c] == 66
                                                    ? n = r
                                                    : x = B[7 - r][c] > 86
                                              : 0;
  std::cout << "AB"[n < m];
}
