#include <bits/stdc++.h>
using namespace std;
string s[8];
int w, b;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  for (int(i) = (0); (i) < int(8); ++(i)) cin >> s[i];
  w = b = 1000;
  for (int(j) = (0); (j) < int(8); ++(j)) {
    int posw = -1;
    int posb = -1;
    for (int(i) = (7); (i) >= int(0); --(i)) {
      if (s[i][j] == 'W') {
        posw = i;
      }
    }
    for (int(i) = (7); (i) >= int(0); --(i)) {
      if (s[i][j] == 'B') {
        posb = i;
      }
    }
    if (posw != -1) {
      if (posb == -1)
        w = min(w, posw);
      else if (posb > posw)
        w = min(w, posw);
    }
  }
  for (int(j) = (0); (j) < int(8); ++(j)) {
    int posw = -1;
    int posb = -1;
    for (int(i) = (0); (i) < int(8); ++(i)) {
      if (s[i][j] == 'W') {
        posw = i;
      }
    }
    for (int(i) = (0); (i) < int(8); ++(i)) {
      if (s[i][j] == 'B') {
        posb = i;
      }
    }
    if (posb != -1) {
      if (posw == -1)
        b = min(b, 7 - posb);
      else if (posb > posw)
        b = min(b, 7 - posb);
    }
  }
  if (w <= b)
    cout << "A";
  else
    cout << "B";
  cin.sync();
  cin.get();
  return 0;
}
