#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int i, j;
  vector<string> v(8);
  for (i = 0; i < 8; i++) cin >> v[i];
  int a = 10, b = 10;
  int n = 8;
  for (j = 0; j < n; j++) {
    for (i = 0; i < n; i++) {
      if (v[i][j] != '.') break;
    }
    if (i < n && v[i][j] == 'W') a = min(a, i);
    for (i = n - 1; i >= 0; i--) {
      if (v[i][j] != '.') break;
    }
    if (i > 0 && v[i][j] == 'B') b = min(b, n - 1 - i);
  }
  if (a <= b)
    cout << "A" << '\n';
  else
    cout << "B" << '\n';
}
