#include <bits/stdc++.h>
using namespace std;
string board[11];
void smin(int &a, int b) {
  if (a > b) a = b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 0; i < 8; ++i) cin >> board[i];
  int min_a = 1234;
  int min_b = 1234;
  for (int j = 0; j < 8; ++j) {
    int i;
    for (i = 0; i < 8 && board[i][j] == '.'; ++i)
      ;
    if (i < 8 && board[i][j] == 'W') smin(min_a, i);
    for (i = 7; i >= 0 && board[i][j] == '.'; --i)
      ;
    if (i >= 0 && board[i][j] == 'B') smin(min_b, 8 - i - 1);
  }
  cerr << min_a << ' ' << min_b << endl;
  if (min_a <= min_b)
    cout << "A" << endl;
  else
    cout << "B" << endl;
  return 0;
}
