#include <bits/stdc++.h>
using namespace std;
char a[10][10];
int main(int argc, char** argv) {
  for (int i = 1; i <= 8; i++)
    for (int j = 1; j <= 8; j++) cin >> a[i][j];
  int A = 1e9, B = 1e9;
  int n = 8;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (a[i][j] == 'W') {
        int flag = 0;
        for (int k = i - 1; k >= 1; k--)
          if (a[k][j] != '.') flag = 1;
        if (!flag) A = min(A, i - 1);
      }
      if (a[i][j] == 'B') {
        int flag = 0, cnt = 0;
        for (int k = i + 1; k <= n; k++) {
          if (a[k][j] != '.') flag = 1;
          ++cnt;
        }
        if (!flag) B = min(B, cnt);
      }
    }
  }
  if (A <= B)
    cout << "A";
  else
    cout << "B";
  return 0;
}
