#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[40][40];
  for (int i = 0; i < 8; i++) scanf("%s", s[i]);
  int mina = 100, minb = 100;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[j][i] == 'B')
        break;
      else if (s[j][i] == 'W' && mina > j)
        mina = j;
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 7; j >= 0; j--) {
      if (s[j][i] == 'W')
        break;
      else if (s[j][i] == 'B' && mina > (7 - j))
        minb = 7 - j;
    }
  }
  if (mina <= minb)
    printf("A\n");
  else
    printf("B\n");
  return 0;
}
