#include <bits/stdc++.h>
using namespace std;
void run() {
  vector<string> v;
  for (int i = 0; i < 8; i++) {
    string s;
    cin >> s;
    v.push_back(s);
  }
  int a = INT_MAX, b = INT_MAX;
  for (int i = 0; i < 8; i++) {
    int c = 0;
    for (int j = 7; j >= 0; j--) {
      if (v[j][i] == 'B') {
        b = min(b, c);
        break;
      } else if (v[j][i] == 'W')
        break;
      c++;
    }
  }
  for (int i = 0; i < 8; i++) {
    int c = 0;
    for (int j = 0; j < 8; j++) {
      if (v[j][i] == 'W') {
        a = min(a, c);
        break;
      } else if (v[j][i] == 'B')
        break;
      c++;
    }
  }
  if (a <= b)
    cout << "A";
  else
    cout << "B";
  return;
}
int main() {
  run();
  return 0;
}
