#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v, v1;
  char a[8][8];
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) cin >> a[i][j];
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) {
      if (a[i][j] == 'B') {
        int b = 0;
        bool t = true;
        for (int k = i + 1; k < 8; k++) {
          b++;
          if (a[k][j] == 'B' || a[k][j] == 'W') {
            t = false;
            break;
          }
        }
        if (t == true) v.push_back(b);
      }
      if (a[i][j] == 'W') {
        int z = 0;
        bool t = true;
        for (int k = i - 1; k >= 0; k--) {
          z++;
          if (a[k][j] == 'B' || a[k][j] == 'W') {
            t = false;
            break;
          }
        }
        if (t == true) {
          v1.push_back(z);
        }
      }
    }
  int m = 999, m1 = 999;
  for (int i = 0; i < v.size(); i++) {
    m = min(m, v[i]);
  }
  for (int i = 0; i < v1.size(); i++) {
    m1 = min(m1, v1[i]);
  }
  if (m >= m1)
    cout << 'A';
  else
    cout << 'B';
  return 0;
}
