#include <bits/stdc++.h>
using namespace std;
char a[8][9];
int main() {
  for (int i = 0; i < 8; i++) {
    scanf("%s", a[i]);
  }
  int black = 9, white = 9;
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++) {
      if (a[i][j] == 'B') {
        break;
      }
      if (a[i][j] == 'W') {
        white = min(white, i);
        break;
      }
    }
    for (int i = 7; i >= 0; i--) {
      if (a[i][j] == 'W') {
        break;
      }
      if (a[i][j] == 'B') {
        black = min(black, 7 - i);
        break;
      }
    }
  }
  printf(white <= black ? "A\n" : "B\n");
  return 0;
}
