#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s[8];
  int ma = INT_MAX, mb = INT_MAX;
  for (long long int i = 0; i < 8; i++) cin >> s[i];
  for (long long int i = 0; i < 8; i++) {
    for (long long int j = 0; j < 8; j++) {
      if (s[i][j] == 'W') {
        int c = 0;
        for (long long int k = i - 1; k >= 0; k--) {
          if (s[k][j] == '.')
            c++;
          else {
            c = INT_MAX;
            break;
          }
        }
        ma = min(ma, c);
      } else if (s[i][j] == 'B') {
        int c = 0;
        for (long long int k = i + 1; k < 8; k++) {
          if (s[k][j] == '.')
            c++;
          else {
            c = INT_MAX;
            break;
          }
        }
        mb = min(mb, c);
      }
    }
  }
  if (ma > mb)
    cout << "B";
  else
    cout << "A";
  return 0;
}
