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