#include <bits/stdc++.h>
using namespace std;
char a[8][8];
int columnCheck(int i, int j, char ch) {
  int k, l;
  if (ch == 'W') {
    for (k = j; k >= 0; k--) {
      if (a[k][i] == 'B') return -1;
    }
  }
  if (ch == 'B') {
    for (k = j; k <= 7; k++) {
      if (a[k][i] == 'W') return -1;
    }
  }
  return 1;
}
int main() {
  int i, j, k, ansA = 7, ansB = 0, amin = 7, bmax = 0, flagA = 0, flagB = 0,
               flag;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      cin >> a[i][j];
    }
  }
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (a[j][i] == 'B') {
        flag = columnCheck(i, j, a[j][i]);
        if (flag != -1 && j >= bmax) {
          bmax = j;
        }
      }
      if (a[j][i] == 'W') {
        flag = columnCheck(i, j, a[j][i]);
        if (flag != -1 && j <= amin) {
          amin = j;
        }
      }
    }
  }
  bmax = 7 - bmax;
  if (amin < bmax) {
    cout << "A" << endl;
  }
  if (amin > bmax) {
    cout << "B" << endl;
  }
  if (amin == bmax) {
    cout << "A" << endl;
  }
  return 0;
}
