#include <bits/stdc++.h>
using namespace std;
int main() {
  char field[8][8];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> field[i][j];
    }
  }
  int minDist = 10;
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++) {
      if (field[i][j] == 'B') {
        break;
      }
      if (field[i][j] == 'W') {
        if (minDist > i) minDist = i;
      }
    }
  }
  int blackMinDist = -1;
  for (int j = 0; j < 8; j++) {
    for (int i = 7; i >= 0; i--) {
      if (field[i][j] == 'W') {
        break;
      }
      if (field[i][j] == 'B') {
        if (blackMinDist < i) blackMinDist = i;
      }
    }
  }
  blackMinDist = 7 - blackMinDist;
  if (blackMinDist >= minDist) {
    cout << "A";
    return 0;
  }
  cout << "B";
  return 0;
}
