#include <bits/stdc++.h>
using namespace std;
const int MX = 2e6 + 10;
const int mod = 1e9 + 7;
const long long int inf = 1LL << 62;
int dx4[] = {0, 0, -1, 1};
int dy4[] = {1, -1, 0, 0};
int dx[] = {1, 1, 1, 0, 0, -1, -1, -1};
int dy[] = {1, 0, -1, 1, -1, 1, 0, -1};
int main() {
  vector<int> v, v1, v2, v3;
  long long int n, m, k, q, t, cnt = 0, sum = 0, ans = 0, mx = -inf, mn = inf,
                               a, b, c, d, e, f, g, h, i, j, x, y, z, temp,
                               temp1;
  string s[10], s1, s2, s3;
  for (int i = 0; i < 8; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[i][j] == 'W') {
        v.push_back(i);
        v.push_back(j);
      }
      if (s[i][j] == 'B') {
        v1.push_back(i);
        v1.push_back(j);
      }
    }
  }
  int len = v.size();
  for (int k = 0; k < len; k++) {
    temp = v[k];
    k++;
    temp1 = v[k];
    ans = 0;
    for (x = temp - 1; x >= 0; x--) {
      if (s[x][temp1] != '.') {
        ans = -1;
        break;
      }
    }
    if (ans == 0) {
      v2.push_back(temp);
    }
  }
  int len1 = v1.size();
  for (int k = 0; k < len1; k++) {
    temp = v1[k];
    k++;
    temp1 = v1[k];
    ans = 0;
    for (x = temp + 1; x < 8; x++) {
      if (s[x][temp1] != '.') {
        ans = -1;
        break;
      }
    }
    if (ans == 0) {
      v3.push_back(7 - temp);
    }
  }
  len = v2.size();
  for (int i = 0; i < len; i++) {
    if (mn > v2[i]) mn = v2[i];
  }
  ans = mn;
  len = v3.size();
  mn = 100000;
  for (int i = 0; i < len; i++) {
    if (mn > v3[i]) mn = v3[i];
  }
  if (ans <= mn)
    cout << "A" << endl;
  else
    cout << "B" << endl;
  return 0;
}
