#include <bits/stdc++.h>
using namespace std;
int a = -1, b = -1;
int main() {
  ios::sync_with_stdio(0);
  string board[10];
  bool emptyA[10], emptyB[10];
  memset(emptyA, true, sizeof emptyA);
  memset(emptyB, true, sizeof emptyB);
  for (int i = 0; i < 8; ++i) {
    cin >> board[i];
    for (int j = 0; j < 8; ++j) {
      if (board[i][j] == 'B') {
        emptyA[j] = false;
      }
      if (board[i][j] == 'W' && a == -1 && emptyA[j]) {
        a = i;
      }
    }
  }
  for (int i = 7; i >= 0; --i) {
    for (int j = 0; j < 8; ++j) {
      if (board[i][j] == 'W') {
        emptyB[j] = false;
      }
      if (board[i][j] == 'B' && b == -1 && emptyB[j]) {
        b = 7 - i;
      }
    }
  }
  if (a <= b) {
    puts("A");
  } else {
    puts("B");
  }
  return 0;
}
