#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int i, j, x, y, l1, l2, f, ans1 = INT_MAX, ans2 = INT_MAX;
  vector<pair<int, int> > v1, v2;
  char arr[10][10];
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      cin >> arr[i][j];
      if (arr[i][j] == 'W') v1.push_back(make_pair(i, j));
      if (arr[i][j] == 'B') v2.push_back(make_pair(i, j));
    }
  }
  l1 = v1.size();
  for (i = 0; i < l1; i++) {
    x = v1[i].first, y = v1[i].second;
    f = 1;
    for (j = x - 1; j >= 0; j--) {
      if (arr[j][y] == 'B') f = 0;
    }
    if (f) ans1 = min(ans1, x);
  }
  l2 = v2.size();
  for (i = 0; i < l2; i++) {
    x = v2[i].first, y = v2[i].second;
    f = 1;
    for (j = x + 1; j < 8; j++) {
      if (arr[j][y] == 'W') f = 0;
    }
    if (f) ans2 = min(ans2, 7 - x);
  }
  if (ans1 <= ans2)
    cout << "A\n";
  else
    cout << "B\n";
  return 0;
}
