#include <bits/stdc++.h>
using namespace std;
int main() {
  char chess[8][8];
  int countA[100] = {0}, countB[100] = {0};
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) cin >> chess[i][j];
  for (int i = 0, l = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) {
      l++;
      if (chess[i][j] == 'W') {
        for (int n = i; n >= 0; n--) {
          if (chess[n][j] != 'B')
            countA[l]++;
          else if (chess[n][j] == 'B') {
            countA[l] = 1000;
            break;
          }
        }
      }
      if (chess[i][j] == 'B') {
        for (int n = i; n < 8; n++) {
          if (chess[n][j] != 'W')
            countB[l]++;
          else if (chess[n][j] == 'W') {
            countB[l] = 1000;
            break;
          }
        }
      }
    }
  int minA = 100, minB = 100;
  for (int i = 0; i < 100; i++) {
    if (countA[i] < minA && countA[i] != 0) minA = countA[i];
    if (countB[i] < minB && countB[i] != 0) minB = countB[i];
  }
  if (minA < minB || minA == minB)
    cout << 'A';
  else if (minA > minB)
    cout << 'B';
  return 0;
}
