#include <bits/stdc++.h>
using namespace std;
int main() {
  string str[10];
  int a, b, c;
  for (a = 0; a < 8; a++) {
    cin >> str[a];
  }
  int c1 = 100, c2 = 100;
  for (a = 0; a < 8; a++) {
    for (b = 0; b < 8; b++) {
      if (str[b][a] == 'W') {
        for (c = b; c >= 0; c--) {
          if (str[c][a] == 'B') {
            break;
          }
        }
        if (c == -1) {
          c1 = min(c1, b);
        }
      }
      if (str[b][a] == 'B') {
        for (c = b; c <= 8; c++) {
          if (str[c][a] == 'W') {
            break;
          }
        }
        if (c == 9) {
          c2 = min(c2, 7 - b);
        }
      }
    }
  }
  if (c1 <= c2) {
    cout << "A\n";
  } else
    cout << "B\n";
}
