#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  char pawn[8][8];
  for (long long i = 0; i < 8; ++i) {
    for (long long j = 0; j < 8; ++j) {
      cin >> pawn[i][j];
    }
  }
  long long A = INT_MAX, B = INT_MAX;
  for (long long i = 0; i < 8; ++i) {
    for (long long j = 0; j < 8; ++j) {
      if (pawn[i][j] == 'W') {
        for (long long k = i; k >= 0; --k) {
          if (pawn[k][j] == 'B') break;
          if (k == 0) A = min(A, i);
        }
      }
      if (pawn[i][j] == 'B') {
        for (long long k = i; k < 8; ++k) {
          if (pawn[k][j] == 'W') break;
          if (k == 7) B = min(B, 7 - i);
        }
      }
    }
  }
  if (A > B)
    cout << 'B';
  else
    cout << 'A';
}
