#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr[8][8];
  for (int i = 0; i < 8; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < 8; j++) arr[i][j] = s[j];
  }
  int minw = 9, minb = 9;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (arr[i][j] == 'W') {
        bool flag = true;
        for (int k = 0; k < i; k++) {
          if (arr[k][j] != '.') {
            flag = false;
            break;
          }
        }
        if (flag == true && minw > i) {
          minw = i;
        }
      } else if (arr[i][j] == 'B') {
        bool flag = true;
        for (int k = 7; k > i; k--) {
          if (arr[k][j] != '.') {
            flag = false;
            break;
          }
        }
        if (flag == true && minb > 7 - i) {
          minb = 7 - i;
        }
      }
    }
  }
  if (minw > minb)
    cout << "B"
         << "\n";
  else
    cout << "A"
         << "\n";
}
