#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
map<long long, long long> mpmim;
char grid[8][8];
pair<int, int> a[40];
int e = 0, e1 = 0, mn = 1000000, mx;
bool w, b;
int main() {
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) cin >> grid[i][j];
  for (int i = 0; i < 8; i++) {
    for (int j = 7; j >= 0; j--) {
      if (grid[j][i] == 'W') {
        break;
      } else if (grid[j][i] == 'B') {
        mx = max(mx, j + 1);
        break;
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (grid[j][i] == 'B') {
        break;
      } else if (grid[j][i] == 'W') {
        mn = min(mn, j + 1);
        break;
      }
    }
  }
  if (8 - mx >= mn - 1) {
    cout << "A" << endl;
  } else
    cout << "B" << endl;
  return 0;
}
