#include <bits/stdc++.h>
using namespace std;
int const lim = 2e5 + 3;
int inp[lim + 3];
string s[10];
bool A[10], B[10];
int main() {
  int n = 8;
  for (int i = 0; i < 8; i++) {
    cin >> s[i];
  }
  int a = 10, b = 10;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[i][j] == 'W' && !A[j]) a = min(a, i);
      if (s[i][j] == 'B') A[j] = true;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    for (int j = 0; j < 8; j++) {
      if (s[i][j] == 'B' && !B[j]) b = min(b, n - i - 1);
      if (s[i][j] == 'W') B[j] = true;
    }
  }
  if (a <= b)
    puts("A");
  else
    puts("B");
}
