#include <bits/stdc++.h>
using namespace std;
long long modx(long long Base, long long exponent) {
  long long ans = 1;
  if (Base == 1) return Base;
  while (exponent) {
    if (exponent & 1) ans = (ans * Base) % 1000000007;
    Base = (Base * Base) % 1000000007;
    exponent = exponent >> 1;
  }
  return ans;
}
long long inmodx(long long num) { return (modx(num, 1000000005LL)); }
bool cmp() { return false; }
string s[8];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int i, j, a = 1000000011, b = 1000000011, x, y;
  for (i = (0); i < (8); i++) cin >> s[i];
  for (i = (0); i < (8); i++) {
    for (j = (0); j < (8); j++) {
      if (s[j][i] == 'B')
        break;
      else if (s[j][i] == 'W') {
        a = min(a, j);
        break;
      }
    }
    for (j = 7; j >= 0; j--) {
      if (s[j][i] == 'W')
        break;
      else if (s[j][i] == 'B') {
        b = min(b, 7 - j);
        break;
      }
    }
  }
  if (a <= b)
    cout << 'A';
  else
    cout << 'B';
  return 0;
}
