#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr[8][8];
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) cin >> arr[i][j];
  int i, j;
  priority_queue<int, vector<int>, greater<int> > white, black;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (arr[j][i] == 'B') break;
      if (arr[j][i] == 'W') {
        white.push(j);
        break;
      }
    }
  }
  for (i = 7; i >= 0; i--) {
    for (j = 7; j >= 0; j--) {
      if (arr[j][i] == 'W') break;
      if (arr[j][i] == 'B') {
        black.push(7 - j);
        break;
      }
    }
  }
  if (white.top() < black.top() || white.top() == black.top())
    cout << 'A' << endl;
  else
    cout << 'B' << endl;
}
