#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[10][10];
  vector<int> W, B;
  for (int i = 0; i < 8; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < s.size(); j++) a[i][j] = s[j];
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (a[i][j] == 'W') {
        int x = 0;
        for (int k = i - 1; k >= 0; k--) {
          if (a[k][j] == '.')
            x++;
          else
            break;
        }
        if (x == i) W.push_back(i);
      }
      if (a[i][j] == 'B') {
        int x = 0;
        for (int k = i + 1; k < 8; k++) {
          if (a[k][j] == '.')
            x++;
          else
            break;
        }
        if (x == 7 - i) B.push_back(7 - i);
      }
    }
  }
  sort(W.begin(), W.end());
  sort(B.begin(), B.end());
  if (W.size() == 0) {
    cout << "B" << endl;
    return 0;
  }
  if (B.size() == 0) {
    cout << "A" << endl;
    return 0;
  }
  if (W[0] <= B[0])
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
