#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  char map[9][9];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> map[i][j];
    }
  }
  int cntrA = 0, cntrB = 0;
  for (int i = 0; i < 8; i++) {
    bool flagA = false;
    for (int j = 0; j < 8; j++) {
      if (map[i][j] == 'W') {
        int q = i;
        while (map[q - 1][j] == '.') {
          q--;
        }
        if (q == 0) {
          cntrA = i;
          flagA = true;
          break;
        }
      }
      if (flagA == true) break;
    }
    if (flagA == true) break;
  }
  for (int ii = 7; ii >= 0; ii--) {
    bool flagB = false;
    for (int jj = 0; jj < 8; jj++) {
      if (map[ii][jj] == 'B') {
        int q = ii;
        while (map[q + 1][jj] == '.') {
          q++;
        }
        if (q == 7) {
          cntrB = 7 - ii;
          flagB = true;
          break;
        }
      }
      if (flagB == true) break;
    }
    if (flagB == true) break;
  }
  if (cntrA > cntrB)
    cout << "B\n";
  else
    cout << "A\n";
}
