#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr[8][8];
  for (int h = 0; h < 8; h++)
    for (int e = 0; e < 8; e++) cin >> arr[h][e];
  int minwhite = 999999;
  int minblack = 999999;
  bool flagwhite = false;
  bool flagblack = false;
  int g;
  for (int k = 0; k < 8; k++) {
    for (int z = 0; z < 8; z++) {
      if (!flagblack)
        if (arr[z][k] == 'W') {
          minwhite = min(minwhite, abs(0 - z));
          flagwhite = true;
        }
      if (arr[z][k] == 'B') {
        flagblack = true;
      }
    }
    flagblack = false;
    flagwhite = false;
    for (int e = 7; e >= 0; e--) {
      if (!flagwhite)
        if (arr[e][k] == 'B') {
          minblack = min(minblack, abs(7 - e));
          flagblack = true;
        }
      if (arr[e][k] == 'W') {
        flagwhite = true;
      }
    }
    flagblack = false;
    flagwhite = false;
  }
  if (minblack < minwhite)
    cout << 'B';
  else
    cout << 'A';
  return 0;
}
