#include <bits/stdc++.h>
using namespace std;
const int INF = 1e1;
int main() {
  int i, j, k, P, Q, flag;
  char s[10][10];
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      cin >> s[i][j];
    }
  }
  P = INF;
  Q = INF;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (s[i][j] == 'W') {
        flag = 0;
        for (k = i; k >= 0; k--) {
          if (s[k][j] == 'B') {
            flag = 1;
            break;
          }
        }
        if (flag == 0) {
          Q = min(Q, i + 1);
        }
      } else if (s[i][j] == 'B') {
        flag = 0;
        for (k = i; k < 8; k++) {
          if (s[k][j] == 'W') {
            flag = 1;
            break;
          }
        }
        if (flag == 0) {
          P = min(P, 8 - i);
        }
      }
    }
  }
  if (P >= Q) {
    cout << "A" << endl;
  } else
    cout << "B" << endl;
  return 0;
}
