#include <bits/stdc++.h>
using namespace std;
const int LENGTH = 9;
const int MANY = 8;
const int INF = 50;
bool inmin(int &a, const int b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  char str[LENGTH];
  int gnd[MANY][MANY];
  for (int i = 0; i < MANY; i++) {
    if (scanf("%s", str) == EOF) {
      return 0;
    }
    for (int j = 0; j < MANY; j++) {
      if (str[j] == 'W') {
        gnd[i][j] = 1;
      } else if (str[j] == 'B') {
        gnd[i][j] = 2;
      } else {
        gnd[i][j] = 0;
      }
    }
  }
  int minA = INF;
  for (int i = 0; i < MANY; i++) {
    for (int j = 0; j < MANY; j++) {
      if (gnd[j][i] == 1) {
        inmin(minA, j);
        break;
      } else if (gnd[j][i] == 2) {
        break;
      }
    }
  }
  int minB = INF;
  for (int i = 0; i < MANY; i++) {
    for (int j = MANY - 1; j >= 0; j--) {
      if (gnd[j][i] == 2) {
        inmin(minB, MANY - j - 1);
        break;
      } else if (gnd[j][i] == 1) {
        break;
      }
    }
  }
  if (minA > minB) {
    printf("B\n");
  } else {
    printf("A\n");
  }
  return 0;
}
