#include <bits/stdc++.h>
using namespace std;
const int N = 8;
const int INF = 9;
int main() {
  int a[N] = {}, b[N] = {};
  for (int k = 0; k < N; k++) {
    for (int i = 0; i < N; i++) {
      char c;
      cin >> c;
      if (c == 'W') {
        if (a[i] == 0) {
          a[i] = k;
        }
        b[i] = -1;
      }
      if (c == 'B') {
        if (a[i] == 0) {
          a[i] = INF;
        }
        b[i] = k;
      }
    }
  }
  int A = 10, B = -2;
  for (int k = 0; k < N; k++) {
    if (a[k] != 0) {
      A = min(A, a[k]);
    }
    if (b[k] != 0) {
      B = max(B, b[k]);
    }
  }
  if (A <= 7 - B) {
    cout << "A\n";
  } else {
    cout << "B\n";
  }
  return 0;
}
