#include <bits/stdc++.h>
char pole[3000][3000];
int main() {
  for (int i = 0; i < 8; i++) {
    gets(pole[i]);
  }
  int mb = 8;
  int mw = 8;
  for (int j = 0; j < 8; j++) {
    for (int i = 7; i >= 0; i--) {
      if (pole[i][j] != '.') {
        if (pole[i][j] == 'B') {
          if (mb > 7 - i) {
            mb = 7 - i;
          }
        }
        break;
      }
    }
  }
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++) {
      if (pole[i][j] != '.') {
        if (pole[i][j] == 'W') {
          if (mw > i) {
            mw = i;
          }
        }
        break;
      }
    }
  }
  if (mb < mw) {
    printf("B");
  } else {
    printf("A");
  }
}
