#include <bits/stdc++.h>
using namespace std;
string s, sub;
int a[8], b[8];
int main() {
  for (int i = 0; i < 8; i++) {
    a[i] = 9;
    b[i] = 9;
  }
  for (int i = 0; i < 8; i++) {
    cin >> s;
    for (int j = 0; j < s.length(); j++) {
      if (s.at(j) == 'W') {
        if (b[j] == 9 && a[j] == 9) a[j] = i;
        b[j] = 8;
      } else {
        if (s.at(j) == 'B') {
          b[j] = 7 - i;
        }
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    if (a[i] > b[i])
      a[i] = 9;
    else if (b[i] > a[i])
      b[i] = 9;
  }
  sort(a, a + 8);
  sort(b, b + 8);
  if (a[0] <= b[0])
    cout << "A\n";
  else
    cout << "B\n";
  return 0;
}
