#include <bits/stdc++.h>
using namespace std;
int main() {
  const int n = 8;
  string chess[n];
  char chs[n][n];
  int bi = 0, wi = 0, b = 8, w = 8;
  for (int i = 0; i < n; i++) {
    cin >> chess[i];
  }
  for (int i = 0; i < n; i++) {
    wi = 0;
    for (int j = 0; j < n; j++) {
      if (chess[j][i] == 'B') break;
      if (chess[j][i] == 'W') {
        wi = j;
        break;
      }
    }
    if (w > wi && wi != 0) w = wi;
  }
  for (int i = 0; i < n; i++) {
    for (int j = n - 1; j >= 0; j--) {
      if (chess[j][i] == 'W') break;
      if (chess[j][i] == 'B') {
        bi = n - 1 - j;
        break;
      }
    }
    if (b > bi && bi != 0) b = bi;
  }
  if (w <= b)
    cout << 'A';
  else
    cout << 'B';
  return 0;
}
