#include <bits/stdc++.h>
using namespace std;
char s[8][10] = {0};
void clear() {}
void solve() {
  for (int i = 1; i < 8; i++) scanf("%s", s[i]);
  int a = 8;
  int b = 8;
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++)
      if (s[i][j] == 'W') {
        a = min(a, i);
        break;
      } else if (s[i][j] == 'B')
        break;
    for (int i = 7; i >= 0; i--)
      if (s[i][j] == 'B') {
        b = min(b, 7 - i);
        break;
      } else if (s[i][j] == 'W')
        break;
  }
  printf("%c\n", a > b ? 'B' : 'A');
}
int main() {
  while (scanf("%s", s[0]) == 1) {
    clear();
    solve();
  }
  return 0;
}
