#include <bits/stdc++.h>
using namespace std;
int main() {
  char st[10][10];
  int minB, minW;
  bool cek;
  vector<pair<int, int> > b, w;
  for (int i = 0; i < 8; i++) {
    scanf("%s", st[i]);
    for (int j = 0; j < strlen(st[i]); j++) {
      if (st[i][j] == 'B') b.push_back(make_pair(i, j));
      if (st[i][j] == 'W') w.push_back(make_pair(i, j));
    }
  }
  minW = 10;
  minB = 10;
  for (int i = 0; i < b.size(); i++) {
    cek = true;
    for (int j = b[i].first + 1; j < 8; j++)
      if (st[j][b[i].second] != '.') cek = false;
    if (cek && minB > 7 - b[i].first) minB = 7 - b[i].first;
  }
  for (int i = 0; i < w.size(); i++) {
    cek = true;
    for (int j = w[i].first - 1; j >= 0; j--)
      if (st[j][w[i].second] != '.') cek = false;
    if (cek && minW > w[i].first) minW = w[i].first;
  }
  printf("%c\n", minB >= minW ? 'A' : 'B');
  return 0;
}
