#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  char mat[10][10];
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> mat[i][j];
    }
  }
  int maxia = 1e9;
  int maxib = 1e9;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (mat[i][j] == 'W') {
        int a = i;
        int cc = 0;
        while (a >= 0) {
          if (mat[a][j] == 'B') {
            cc = 1e9;
            break;
          }
          if (a == 0) break;
          cc++;
          a--;
        }
        maxia = min(maxia, cc);
      } else if (mat[i][j] == 'B') {
        int a = i;
        int cc = 0;
        while (a < 8) {
          if (mat[a][j] == 'W') {
            cc = 1e9;
            break;
          }
          if (a == 7) break;
          cc++;
          a++;
        }
        maxib = min(maxib, cc);
      }
    }
  }
  if (maxia <= maxib) {
    cout << "A" << endl;
  } else
    cout << "B" << endl;
  return 0;
}
