#include <bits/stdc++.h>
using namespace std;
char a[8][8];
int i, j;
void go() {
  for (i = 7; i >= 0; i--)
    for (j = 7; j >= 0; j--)
      if (a[i][j] == 'B' && a[i + 1][j] == '.') swap(a[i][j], a[i + 1][j]);
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++)
      if (a[i][j] == 'W' && a[i - 1][j] == '.') swap(a[i][j], a[i - 1][j]);
}
int check() {
  int c = 0;
  for (i = 0; i < 8; i++)
    if (a[0][i] == 'W') c = 1;
  if (c != 1)
    for (i = 0; i < 8; i++)
      if (a[7][i] == 'B') c = 2;
  return c;
}
int main() {
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++) cin >> a[i][j];
  while (check() == 0) go();
  cout << (check() == 1 ? 'A' : 'B');
}
