#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string s;
  int aw = 8, ab = 0;
  vector<string> v;
  for (int i = 0; i < 8; i++) {
    cin >> s;
    v.push_back(s);
  }
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++) {
      if (v[i][j] == 'W') {
        aw = min(aw, i);
      }
      if (v[i][j] == 'B') {
        break;
      }
    }
  }
  for (int j = 0; j < 8; j++) {
    for (int i = 7; i >= 0; i--) {
      if (v[i][j] == 'B') {
        ab = max(ab, i);
      }
      if (v[i][j] == 'W') {
        break;
      }
    }
  }
  ab = 7 - ab;
  aw <= ab ? cout << "A" : cout << "B";
  return 0;
}
