#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  vector<string> v;
  map<int, pair<int, int>> mp;
  for (int i = 0; i < 8; i++) {
    string s;
    cin >> s;
    v.push_back(s);
  }
  long long int min_f = 1e9;
  long long int min_f1 = 1e9;
  for (long long int i = 0; i < 8; i++) {
    long long int flag = 0, flag1 = 0, mini1 = 1e9, mini2 = 1e9;
    for (long long int j = 0; j < 8; j++) {
      if (v[j][i] == 'B') {
        int k = j;
        while (k <= 7 && v[k][i] != 'W') {
          k++;
        }
        if (k == 8) mini1 = min(mini1, 7 - j);
      } else if (v[j][i] == 'W') {
        int k = j;
        while (k >= 0 && v[k][i] != 'B') {
          k--;
        }
        if (k < 0) mini2 = min(mini2, j);
      }
    }
    min_f = min(min_f, mini1);
    min_f1 = min(min_f1, mini2);
  }
  if (min_f == min_f1 && min_f == 1e9) {
  } else if (min_f < min_f1) {
    cout << 'B' << '\n';
  } else {
    cout << 'A' << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  for (; t--;) {
    solve();
  }
}
