#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int N = 15;
const int M = 10005;
const int inf = 1000000000;
const int mod = 2009;
char s[N][N];
bool v[N];
int main() {
  int i, j, Min1, Min2;
  Min1 = Min2 = inf;
  memset(v, false, sizeof(v));
  for (i = 1; i <= 8; i++) scanf("%s", s[i]);
  for (i = 1; i <= 8; i++)
    for (j = 0; j < 8; j++)
      if (s[i][j] != '.') {
        if (!v[j] && s[i][j] == 'W') Min1 = min(Min1, i - 1);
        v[j] = true;
      }
  memset(v, false, sizeof(v));
  for (i = 8; i >= 1; i--)
    for (j = 0; j < 8; j++)
      if (s[i][j] != '.') {
        if (!v[j] && s[i][j] == 'B') Min2 = min(Min2, 8 - i);
        v[j] = true;
      }
  if (Min1 > Min2)
    puts("B");
  else
    puts("A");
  return 0;
}
