#include <bits/stdc++.h>
using namespace std;
int main() {
  string a[8];
  for (int i = 0; i < 8; ++i) {
    cin >> a[i];
  }
  int l = 10, r = 10;
  for (int i = 0; i < 8; ++i) {
    for (int j = 0; j < 8; ++j) {
      if (a[i][j] == 'W') {
        int t = i;
        while (true) {
          --t;
          if (t < 0) {
            l = min(l, i);
            break;
          }
          if (a[t][j] == 'B') {
            break;
          }
        }
      }
      if (a[i][j] == 'B') {
        int t = i;
        while (true) {
          ++t;
          if (t >= 8) {
            r = min(r, 8 - i - 1);
            break;
          }
          if (a[t][j] == 'W') {
            break;
          }
        }
      }
    }
  }
  if (l <= r)
    cout << "A" << endl;
  else
    cout << "B" << endl;
  return 0;
}
