#include <bits/stdc++.h>
using namespace std;
char grid[10][10];
bool colW[10], colB[10];
int main() {
  int Case = 1;
  int l, p, q;
  char dump[2];
  while (gets(grid[1])) {
    for (int i = 2; i <= 8; i++) {
      gets(grid[i]);
    }
    memset(colB, false, sizeof(colB));
    memset(colW, false, sizeof(colW));
    bool found = false;
    int white, black;
    for (int i = 1; i <= 8 && !found; i++) {
      for (int j = 0; j < 8 && !found; j++) {
        if (grid[i][j] == 'W') {
          if (!colB[j]) {
            found = true;
            white = i - 1;
          }
        } else if (grid[i][j] == 'B') {
          colB[j] = true;
        }
      }
    }
    found = false;
    for (int i = 8; i >= 1 && !found; i--) {
      for (int j = 0; j < 8 && !found; j++) {
        if (grid[i][j] == 'B') {
          if (!colW[j]) {
            found = true;
            black = 8 - i;
          }
        } else if (grid[i][j] == 'W') {
          colW[j] = true;
        }
      }
    }
    if (white <= black)
      puts("A");
    else
      puts("B");
  }
  return 0;
}
