#include <bits/stdc++.h>
using namespace std;
char board[9][9];
int main() {
  for (int i = 1; i <= 8; i++) {
    for (int j = 1; j <= 8; j++) {
      scanf(" %c", &board[i][j]);
    }
  }
  int minA = 0x3f3f3f3f, minB = 0x3f3f3f3f;
  for (int i = 1; i <= 8; i++) {
    for (int j = 1; j <= 8; j++) {
      if (board[i][j] == 'W') {
        int cnt = 0;
        int k = i - 1;
        for (; k >= 1; k--) {
          if (board[k][j] == '.') {
            cnt++;
          } else {
            break;
          }
        }
        if (!k) {
          minA = min(minA, cnt);
        }
      } else if (board[i][j] == 'B') {
        int cnt = 0;
        int k = i + 1;
        for (; k <= 8; k++) {
          if (board[k][j] == '.') {
            cnt++;
          } else {
            break;
          }
        }
        if (k == 9) {
          minB = min(minB, cnt);
        }
      }
    }
  }
  if (minB < minA) {
    puts("B");
  } else {
    puts("A");
  }
  return 0;
}
