#include <bits/stdc++.h>
using namespace std;
int main() {
  char field[63];
  for (int i = 0; i < 64; i++) {
    cin >> field[i];
  }
  int aSteps = 10;
  int bSteps = 10;
  for (int column = 0; column < 8; column++) {
    for (int row = 0; row < 8; row++) {
      int position = column + row * 8;
      if (field[position] == 'B') {
        break;
      }
      if (field[position] == 'W') {
        if (row <= aSteps) {
          aSteps = row;
        }
        break;
      }
    }
  }
  for (int column = 0; column < 8; column++) {
    for (int row = 7; row >= 0; row--) {
      int position = column + row * 8;
      if (field[position] == 'B') {
        if (7 - row <= bSteps) {
          bSteps = 7 - row;
        }
        break;
        ;
      }
      if (field[position] == 'W') {
        break;
      }
    }
  }
  string winner = (aSteps <= bSteps) ? "A" : "B";
  cout << winner << endl;
}
