#include <bits/stdc++.h>
using namespace std;
int main() {
  char ar[8][8];
  long long int flag = 0, min1 = 7, min2 = 7, m, n, f = 0;
  for (long long int i = 0; i < 8; i++) {
    for (long long int j = 0; j < 8; j++) {
      cin >> ar[i][j];
    }
  }
  for (long long int i = 0; i < 8; i++) {
    for (long long int j = 0; j < 8; j++) {
      flag = 0, f = 0;
      if (ar[i][j] == 'W') {
        for (long long int k = 0; k < i; k++) {
          if (ar[k][j] == 'B') {
            flag = 1;
            break;
          }
        }
        if (flag == 0 && i < min1) min1 = i;
      } else if (ar[i][j] == 'B') {
        for (long long int k = i + 1; k < 8; k++) {
          if (ar[k][j] == 'W') {
            f = 1;
            break;
          }
        }
        if (f == 0 && 7 - i < min2) min2 = 7 - i;
      }
    }
  }
  if (min2 < min1)
    cout << "B";
  else
    cout << "A";
  return 0;
}
