#include <bits/stdc++.h>
using namespace std;
int main() {
  char board[8][8];
  int whitePos = 0, blackPos = 0, blackCount = 0, whiteCount = 0, whiteTemp = 0,
      blackTemp = 0;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> board[i][j];
    }
  }
  for (int i = 7; i >= 0; i--) {
    for (int j = 0; j < 8; j++) {
      if (board[i][j] == 'W') {
        whiteTemp = i;
        for (int pos = i - 1; pos >= 0; pos--)
          if (board[pos][j] != 'B' && board[pos][j] != 'W') whiteCount++;
        if (whiteCount == whiteTemp) {
          whitePos = whiteTemp;
        }
        whiteCount = 0;
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (board[i][j] == 'B') {
        blackTemp = i;
        for (int pos = i + 1; pos < 8; pos++)
          if (board[pos][j] != 'B' && board[pos][j] != 'W') blackCount++;
        if (blackCount == 7 - blackTemp) {
          blackPos = blackTemp;
        }
        blackCount = 0;
      }
    }
  }
  if ((7 - blackPos) < (whitePos))
    cout << 'B' << endl;
  else
    cout << 'A' << endl;
}
