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