#include <bits/stdc++.h>
using namespace std;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const long long int Inf = 1LL << 62;
char ch[10][10];
int main() {
  long long int n, m, t, k, q;
  while (cin >> ch[1][1]) {
    for (int i = 1; i <= 8; i++) {
      for (int j = 1; j <= 8; j++) {
        if (i != j || i != 1) {
          cin >> ch[i][j];
        }
      }
    }
    long long int a = Inf, b = Inf;
    for (int j = 1; j <= 8; j++) {
      long long int cnt = 0;
      long long int ret = 0;
      for (int i = 1; i <= 8; i++) {
        if (ch[i][j] == '.') {
          cnt++;
        } else if (ch[i][j] == 'W') {
          ret = 1;
          break;
        } else {
          break;
        }
      }
      if (ret) {
        a = min(a, cnt);
      }
    }
    for (int j = 1; j <= 8; j++) {
      long long int cnt = 0;
      long long int ret = 0;
      for (int i = 8; i >= 1; i--) {
        if (ch[i][j] == '.') {
          cnt++;
        } else if (ch[i][j] == 'B') {
          ret = 1;
          break;
        } else {
          break;
        }
      }
      if (ret) {
        b = min(b, cnt);
      }
    }
    if (a <= b) {
      printf("A\n");
    } else {
      printf("B\n");
    }
    cerr << "--------------------" << endl;
  }
  return 0;
}
