#include <bits/stdc++.h>
using namespace std;
int main() {
  int amin = 10, bmin = 10;
  char mat[8][8];
  map<int, int> mapping;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> mat[i][j];
    }
    getchar();
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (mat[i][j] == 'B') mapping[j] = 1;
      if (mat[i][j] == 'W' && mapping.find(j) == mapping.end()) {
        if (i < amin) amin = i;
        mapping[j] = 1;
        break;
      }
    }
  }
  mapping.clear();
  for (int i = 7; i >= 0; i--) {
    for (int j = 7; j >= 0; j--) {
      if (mat[i][j] == 'W') mapping[j] = 1;
      if (mat[i][j] == 'B' && mapping.find(j) == mapping.end()) {
        if (7 - i < bmin) bmin = 7 - i;
        mapping[j] = 1;
        break;
      }
    }
  }
  if (amin <= bmin) {
    cout << 'A' << endl;
  } else
    cout << 'B' << endl;
  return 0;
}
