#include <bits/stdc++.h>
using namespace std;
char T[10][10];
bool noup(int i, int j) {
  for (int k = i - 1; k >= 0; k--) {
    if (T[k][j] == 'B') return false;
  }
  return true;
}
bool nodown(int i, int j) {
  for (int k = i + 1; k < 8; k++) {
    if (T[k][j] == 'W') return false;
  }
  return true;
}
void read() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> T[i][j];
    }
  }
}
void solve() {
  char a;
  int pie = 90, dru = 90;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      a = T[i][j];
      if (a == 'W' && noup(i, j)) {
        pie = min(pie, i);
      } else if (a == 'B' && nodown(i, j)) {
        dru = min(dru, 8 - i - 1);
      } else
        continue;
    }
  }
  if (pie <= dru)
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
int main() {
  read();
  solve();
  return 0;
}
