#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e9;
struct comparator {
  bool operator()(const pair<int, int> &a, const pair<int, int> &b) {
    return a.first > b.first;
  }
} cmp;
int main() {
  char in;
  vector<pair<int, int> > white, black;
  int board[8][8];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      board[i][j] = 0;
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> in;
      if (in == 'W') {
        white.push_back(pair<int, int>(i, j));
        board[i][j] = 1;
      }
      if (in == 'B') {
        black.push_back(pair<int, int>(i, j));
        board[i][j] = 2;
      }
    }
  }
  sort(white.begin(), white.end());
  sort(black.begin(), black.end(), cmp);
  int i = 0, j = 0, x;
  if (white[i].first == 0) {
    cout << "A" << endl;
    return 0;
  }
  int pos_A = white[i].first;
  int pos_B = black[j].first;
  if (pos_A - 1 == 0 && board[pos_A - 1][white[i].second] == 0) {
    cout << "A" << endl;
    return 0;
  }
  while (pos_A != 0) {
    pos_A--;
    if (board[pos_A][white[i].second] != 0) {
      i++;
      pos_A = white[i].first;
      continue;
    }
  }
  while (pos_B != 7) {
    pos_B++;
    if (board[pos_B][black[j].second] != 0) {
      j++;
      pos_B = black[j].first;
      continue;
    }
  }
  pos_A = white[i].first;
  pos_B = black[j].first;
  if (pos_A - (7 - pos_B) <= 0) {
    cout << "A" << endl;
  } else {
    cout << "B" << endl;
  }
  return 0;
}
