#include <bits/stdc++.h>
using namespace std;
string S[8];
int mi[3] = {10, 10};
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  for (y = 0; y < 8; y++) cin >> S[y];
  for (x = 0; x < 8; x++) {
    for (y = 0; y < 8; y++) {
      if (S[y][x] == 'W') mi[0] = min(mi[0], y);
      if (S[y][x] == 'B') break;
    }
    for (y = 7; y >= 0; y--) {
      if (S[y][x] == 'B') mi[1] = min(mi[1], 7 - y);
      if (S[y][x] == 'W') break;
    }
  }
  if (mi[0] <= mi[1])
    (void)printf("A\n");
  else
    (void)printf("B\n");
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < argc - 1; i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < s.size(); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
