#include <bits/stdc++.h>
const int maxn = (int)1e6;
const int mod = (int)1e9 + 7;
using namespace std;
vector<string> v;
int mnW = maxn, mnB = maxn;
int smin(int &a, int b) {
  if (a > b) a = b;
}
int main() {
  v.resize(8);
  for (int i = 0; i < 8; i++) cin >> v[i];
  for (int j = 0; j < 8; j++) {
    int i = 0;
    while (i < 8 && v[i][j] == '.') i++;
    if (i < 8 && v[i][j] == 'W') smin(mnW, i);
  }
  for (int j = 0; j < 8; j++) {
    int i = 7;
    while (i >= 0 && v[i][j] == '.') i--;
    if (i >= 0 && v[i][j] == 'B') smin(mnB, 7 - i);
  }
  if (mnW <= mnB)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
