#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr[8][8];
  long long int i, j, k;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) cin >> arr[i][j];
  }
  long long int minw = 9, minb = 9;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      long long int cnt = 0;
      if (arr[i][j] == 'B') {
        for (k = i + 1; k < 8; k++) {
          if (arr[k][j] == '.')
            cnt++;
          else
            break;
        }
        if (k == 8 && cnt < minb) minb = cnt;
      }
    }
  }
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      long long int cnt = 0;
      if (arr[i][j] == 'W') {
        for (k = i - 1; k > -1; k--) {
          if (arr[k][j] == '.')
            cnt++;
          else
            break;
        }
        if (k == -1 && cnt < minw) minw = cnt;
      }
    }
  }
  while (1) {
    minw--;
    if (minw == 0) {
      cout << "A" << endl;
      break;
    }
    minb--;
    if (minb == 0) {
      cout << "B" << endl;
      break;
    }
  }
  return 0;
}
