#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, dist1 = 1001, dist2 = 1001, f = 0, f1 = 0, k;
  char a[9][9];
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) cin >> a[i][j];
  }
  for (i = 1; i < 7; i++) {
    for (j = 0; j < 8; j++) {
      f = 0;
      f1 = 0;
      if (a[i][j] == 'B') {
        for (k = i; k < 8; k++) {
          if (a[k][j] == 'W') {
            f = 1;
            break;
          }
        }
        if (f == 0) dist1 = min(dist1, 7 - i);
      } else if (a[i][j] == 'W') {
        for (k = i; k >= 0; k--)
          if (a[k][j] == 'B') f1 = 1;
        if (f1 == 0) dist2 = min(dist2, i);
      }
    }
  }
  if (dist1 < dist2)
    cout << "B";
  else
    cout << "A";
}
