#include <bits/stdc++.h>
using namespace std;
int main() {
  string row;
  int Br[64], Bc[64], Wr[64], Wc[64], iB = 0, iW = 0;
  for (int r = 0; r < 8; r++) {
    cin >> row;
    for (int c = 0; c < 8; c++)
      if (row[c] == 'W') {
        Wr[iW] = r;
        Wc[iW] = c;
        iW++;
      } else if (row[c] == 'B') {
        Br[iB] = r;
        Bc[iB] = c;
        iB++;
      }
  }
  int mB = 10, mW = 10;
  for (int i = 0; i < iB; i++) {
    for (int j = 0; j < iW; j++)
      if (Wc[j] == Bc[i] && Wr[j] > Br[i]) goto BB;
    mB = min(mB, 7 - Br[i]);
  BB:;
  }
  for (int i = 0; i < iW; i++) {
    for (int j = 0; j < iW; j++)
      if (Bc[j] == Wc[i] && Br[j] < Wr[i]) goto WW;
    mW = min(mW, Wr[i]);
  WW:;
  }
  if (mB >= mW)
    cout << 'A' << endl;
  else
    cout << 'B' << endl;
}
