#include <bits/stdc++.h>
using namespace std;
int main() {
  int mw = 100, mb = 100;
  char arr[8][8];
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) cin >> arr[i][j];
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) {
      if (arr[j][i] == 'W')
        mw = min(mw, j);
      else if (arr[j][i] == 'B')
        break;
    }
  for (int i = 0; i < 8; i++)
    for (int j = 7; j > 0; j--) {
      if (arr[j][i] == 'B')
        mb = min(mb, 7 - j);
      else if (arr[j][i] == 'W')
        break;
    }
  if (mb >= mw)
    cout << "A" << endl;
  else
    cout << "B" << endl;
  return 0;
}
