#include <bits/stdc++.h>
using namespace std;
int main() {
  char g[8][8];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      scanf("%c", &g[i][j]);
    }
    getchar();
  }
  int pos1 = -1, pos2 = -1;
  int ans1 = 987654321, ans2 = 987654321;
  for (int i = 0; i < 8; i++) {
    pos1 = -1;
    for (int j = 0; j < 8; j++) {
      if (g[j][i] != '.') {
        if (g[j][i] == 'W') {
          pos1 = j;
          break;
        } else
          break;
      }
    }
    if (pos1 != -1) ans1 = min(ans1, pos1);
  }
  for (int i = 0; i < 8; i++) {
    pos1 = -1;
    for (int j = 7; j >= 0; j--) {
      if (g[j][i] != '.') {
        if (g[j][i] == 'B') {
          pos1 = j;
          break;
        } else
          break;
      }
    }
    if (pos1 != -1) ans2 = min(ans2, 8 - pos1 - 1);
  }
  if (ans1 != 987654321) {
    if (ans1 <= ans2) printf("A\n");
  }
  if (ans2 != 987654321) {
    if (ans2 < ans1) printf("B\n");
  }
  return 0;
}
