#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long MOD = 1e9 + 7;
const int MX = 100015;
char c[11][11];
int main() {
  int n = 8;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) cin >> c[i][j];
  }
  int mnw = 11, mnb = 11;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      bool b = 0;
      if (c[i][j] == '.') continue;
      if (c[i][j] == 'B') {
        for (int k = i + 1; k < n; k++) {
          if (c[k][j] == 'W') b = 1;
        }
      }
      if (c[i][j] == 'W') {
        for (int k = i - 1; k >= 0; k--) {
          if (c[k][j] == 'B') b = 1;
        }
      }
      if (b == 0) {
        if (c[i][j] == 'W')
          mnw = min(mnw, i);
        else
          mnb = min(mnb, 8 - i - 1);
      }
    }
  }
  if (mnw > mnb)
    cout << 'B';
  else
    cout << 'A';
}
