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