#include <bits/stdc++.h>
using namespace std;
int cnt, ans = 1000000007;
char a[10][10];
vector<int> c, second;
int main() {
  for (int i = 1; i <= 8; i++) {
    for (int j = 1; j <= 8; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 1; i <= 8; i++) {
    bool ok = true;
    for (int j = 1; j <= 8; j++) {
      if (a[j][i] == 'B') {
        for (int k = j + 1; k <= 8; k++) {
          if (a[k][i] != '.') {
            ok = false;
            cnt = 0;
            break;
          } else
            cnt++;
        }
        if (ok) c.push_back(cnt);
        cnt = 0;
        ok = true;
      }
    }
  }
  cnt = 0;
  for (int i = 1; i <= 8; i++) {
    bool ok = true;
    for (int j = 1; j <= 8; j++) {
      if (a[j][i] == 'W') {
        for (int k = j - 1; k >= 1; k--) {
          if (a[k][i] != '.') {
            cnt = 0;
            ok = false;
            break;
          } else
            cnt++;
        }
        if (ok) second.push_back(cnt);
        cnt = 0;
        ok = true;
      }
    }
  }
  sort(c.begin(), c.end());
  sort(second.begin(), second.end());
  if (second[0] <= c[0])
    cout << "A";
  else
    cout << "B";
  return 0;
  ;
}
