#include <bits/stdc++.h>
using namespace std;
long long cb[10];
long long cw[10];
long long a[10][10];
void Solve() {
  for (long long i = 0; i < 10; i++) {
    cb[i] = 1e18;
    cw[i] = 0;
  }
  vector<pair<long long, long long> > w, b;
  for (long long i = 0; i < 8; i++) {
    for (long long j = 0; j < 8; j++) {
      char c;
      cin >> c;
      a[i][j] = c;
      if (c == '.') continue;
      if (c == 'B') {
        b.push_back({i, j});
      }
      if (c == 'W') {
        w.push_back({i, j});
      }
    }
  }
  long long B = 1e18, W = 1e18;
  for (auto now : w) {
    long long x = now.first, y = now.second;
    long long ct = 0;
    bool ok = 1;
    bool fst = 1;
    while (x >= 0) {
      if (fst) {
        fst = 0;
        x--;
        ct++;
        continue;
      }
      if (!fst && a[x][y] != '.') {
        ok = 0;
        break;
      }
      ct++;
      x--;
    }
    if (ok && ct < W) {
      W = ct;
    }
  }
  for (auto now : b) {
    long long x = now.first, y = now.second;
    long long ct = 0;
    bool ok = 1;
    bool fst = 1;
    while (x < 8) {
      if (fst) {
        fst = 0;
        x++;
        ct++;
        continue;
      }
      if (!fst && a[x][y] != '.') {
        ok = 0;
        break;
      }
      ct++;
      x++;
    }
    if (ok && ct < B) {
      B = ct;
    }
  }
  if (W <= B)
    cout << 'A';
  else
    cout << "B";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  Solve();
  return 0;
}
