#include <bits/stdc++.h>
using namespace std;
char s[100][100];
const int INF = 1e9;
int main() {
  for (int i = 1; i <= 8; i++) {
    scanf("%s", s[i] + 1);
  }
  int A = INF, B = INF;
  for (int i = 1; i <= 8; i++) {
    for (int j = 1; j <= 8; j++) {
      if (s[i][j] == 'W') {
        bool ok = 1;
        for (int k = 1; k < i; k++) {
          if (s[k][j] == 'B') {
            ok = 0;
            break;
          }
        }
        if (ok) A = min(A, i - 1);
      }
    }
  }
  for (int i = 1; i <= 8; i++) {
    for (int j = 1; j <= 8; j++) {
      if (s[i][j] == 'B') {
        bool ok = 1;
        for (int k = i + 1; k <= 8; k++) {
          if (s[k][j] == 'W') {
            ok = 0;
            break;
          }
        }
        if (ok) B = min(B, 8 - i);
      }
    }
  }
  if (A <= B)
    puts("A");
  else
    puts("B");
  return 0;
}
