#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
string A[8];
bool block[8];
int main() {
  for (int i = 0; i < 8; i++) cin >> A[i];
  int ansA = 8;
  int ansB = 8;
  for (int i = 0; i < 8; i++) block[i] = false;
  for (int i = 0; i < 8 and ansA == 8; i++) {
    for (int j = 0; j < 8 and ansA == 8; j++) {
      if (!block[j]) {
        if (A[i][j] == 'W') ansA = i;
        if (A[i][j] != '.') block[j] = true;
      }
    }
  }
  for (int i = 0; i < 8; i++) block[i] = false;
  for (int i = 7; i >= 0 and ansB == 8; i--) {
    for (int j = 0; j < 8 and ansB == 8; j++) {
      if (!block[j]) {
        if (A[i][j] == 'B') ansB = 7 - i;
        if (A[i][j] != '.') block[j] = true;
      }
    }
  }
  if (ansA <= ansB)
    cout << "A\n";
  else
    cout << "B\n";
  return 0;
}
