#include <bits/stdc++.h>
using namespace std;
char grid[8][8];
vector<pair<int, int> > a, b;
int main() {
  for (int i = 0; i < 8; i++) cin >> grid[i];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++)
      if (grid[i][j] == 'W') a.push_back(pair<int, int>(i, j));
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++)
      if (grid[i][j] == 'B') b.push_back(pair<int, int>(i, j));
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  int ans = 1000000007, sol = 1000000007;
  for (int i = 0; i < a.size(); i++) {
    int r = a[i].first;
    int c = a[i].second;
    bool com = 1;
    for (int j = 0; j < b.size(); j++)
      if (b[j].first < r && b[j].second == c) {
        com = 0;
        break;
      }
    if (com) {
      ans = r;
      break;
    }
  }
  for (int i = b.size() - 1; i >= 0; i--) {
    int r = b[i].first;
    int c = b[i].second;
    bool com = 1;
    for (int j = 0; j < a.size(); j++)
      if (a[j].first > r && a[j].second == c) {
        com = 0;
        break;
      }
    if (com) {
      sol = 7 - r;
      break;
    }
  }
  if (ans <= sol)
    cout << "A";
  else
    cout << "B";
}
