#include <bits/stdc++.h>
using namespace std;
int main() {
  char tab[8][8];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> tab[i][j];
    }
  }
  int bestdistancew = 7, bestdistanceb = 7;
  for (int j = 0; j < 8; j++) {
    int distw = 7, trouve = 0;
    for (int i = 0; i < 8; i++) {
      if (trouve == 0) {
        if (tab[i][j] == 'B') {
          trouve = 1;
        }
        if (tab[i][j] == 'W') {
          distw = i;
          trouve = 1;
        }
      }
    }
    if (distw < bestdistancew) bestdistancew = distw;
  }
  for (int j = 0; j < 8; j++) {
    int distb = 7, trouve = 0;
    for (int i = 7; i >= 0; i--) {
      if (trouve == 0) {
        if (tab[i][j] == 'W') {
          trouve = 1;
        }
        if (tab[i][j] == 'B') {
          distb = 7 - i;
          trouve = 1;
        }
      }
    }
    if (distb < bestdistanceb) bestdistanceb = distb;
  }
  if (bestdistancew <= bestdistanceb)
    cout << "A";
  else
    cout << "B";
  return 0;
}
