#include <bits/stdc++.h>
using namespace std;
int main() {
  int w = INT_MAX, b = INT_MAX;
  char A[8][8];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> A[i][j];
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (A[i][j] == 'B') {
        int k = i + 1;
        int itung = 0;
        bool cek = 1;
        while (k < 8) {
          if (A[k][j] == 'W') {
            cek = 0;
            break;
          }
          k++;
          itung++;
        }
        if (cek) b = min(b, itung);
      } else if (A[i][j] == 'W') {
        int k = i - 1;
        int itung = 0;
        bool cek = 1;
        while (k >= 0) {
          if (A[k][j] == 'B') {
            cek = 0;
            break;
          }
          k--;
          itung++;
        }
        if (cek) w = min(w, itung);
      }
    }
  }
  if (w <= b)
    cout << 'A' << endl;
  else
    cout << 'B' << endl;
}
