#include <bits/stdc++.h>
using namespace std;
string board[8];
int main() {
  int mA = 15, mB = 15;
  for (int r = 0; r < 8; r++) {
    cin >> board[r];
  }
  for (int r = 0; r < 8; r++) {
    for (int c = 0; c < 8; c++) {
      if (board[r][c] == 'W') {
        bool pos = true;
        for (int r1 = r - 1; r1 > -1; r1--)
          if (board[r1][c] != '.') pos = false;
        if (!pos) continue;
        mA = min(mA, r);
      }
      if (board[r][c] == 'B') {
        bool pos = true;
        for (int r1 = r + 1; r1 < 8; r1++)
          if (board[r1][c] != '.') pos = false;
        if (!pos) continue;
        mB = min(mB, 7 - r);
      }
    }
  }
  if (mA <= mB) {
    cout << "A" << endl;
  } else {
    cout << "B" << endl;
  }
}
