#include <bits/stdc++.h>
using namespace std;
char a[10][10];
int main() {
  int ans1 = 0x7ffffff, ans2 = 0x7ffffff, flag1 = 0, flag2 = 0;
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) cin >> a[i][j];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (a[i][j] == 'W') {
        flag1 = 1;
        for (int k = 0; k < i; k++) {
          if (a[k][j] == 'B') {
            flag1 = 0;
            break;
          }
        }
        if (flag1) {
          ans1 = i;
          break;
        }
      }
    }
    if (flag1) break;
  }
  for (int i = 7; i >= 0; i--) {
    for (int j = 0; j < 8; j++) {
      if (a[i][j] == 'B') {
        for (int k = i + 1; k < 8; k++) {
          flag2 = 1;
          if (a[k][j] == 'W') {
            flag2 = 0;
            break;
          }
        }
        if (flag2) {
          ans2 = 7 - i;
          break;
        }
      }
    }
    if (flag2) break;
  }
  if (ans1 - 1 < ans2)
    cout << "A" << endl;
  else
    cout << "B" << endl;
}
