#include <bits/stdc++.h>
using namespace std;
int main() {
  string board[8];
  int i, j, minb = INT_MAX, minw = INT_MAX, cnt, k;
  for (i = 0; i < 8; ++i) cin >> board[i];
  for (i = 0; i < 8; ++i) {
    for (j = 0; j < 8; ++j) {
      if (board[i].at(j) == 'B') {
        cnt = 0;
        for (k = i + 1; k < 8; ++k) {
          if (board[k].at(j) != '.')
            break;
          else
            cnt++;
        }
        if (k == 8) minb = min(cnt, minb);
      }
      if (board[i].at(j) == 'W') {
        cnt = 0;
        for (k = i - 1; k >= 0; --k) {
          if (board[k].at(j) != '.')
            break;
          else
            cnt++;
        }
        if (k == -1) minw = min(cnt, minw);
      }
    }
  }
  if (minw <= minb) {
    cout << "A";
  } else
    cout << "B" << endl;
  return 0;
}
