#include <bits/stdc++.h>
using namespace std;
int tt1;
int calc(vector<string>& b, char ch, int dir) {
  int m = 99999;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (b[i][j] == ch) {
        int f = 0, c = 0;
        for (int k = i;; k += dir) {
          if (b[k][j] != '.' && b[k][j] != ch) {
            f = 1;
            break;
          }
          if (dir == -1 && k == 0) break;
          if (dir == 1 && k == 7) break;
          c++;
        }
        if (!f) m = min(m, c);
      }
    }
  }
  return m;
}
void MAIN() {
  vector<string> b;
  for (int i = 0; i < 8; i++) {
    string s;
    cin >> s;
    b.push_back(s);
  }
  int c1 = calc(b, 'W', -1), c2 = calc(b, 'B', 1);
  if (c1 <= c2)
    cout << "A";
  else
    cout << "B";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(12);
  MAIN();
  return 0;
}
