#include <bits/stdc++.h>
using namespace std;
char CHESS[9][9];
int SA = 100, SB = 100;
int main() {
  for (int i = 1; i <= 8; ++i)
    for (int j = 1; j <= 8; ++j) cin >> CHESS[i][j];
  for (int a = 1; a <= 8; a++) {
    for (int b = 1; b <= 8; b++) {
      if (CHESS[a][b] == 'W') {
        bool done = false;
        for (int c = a; c >= 1; c--)
          if (CHESS[c][b] == 'B') {
            done = true;
            break;
          }
        if (done) continue;
        SA = min(SA, a - 1);
      }
    }
  }
  for (int a = 1; a <= 8; a++) {
    for (int b = 1; b <= 8; b++) {
      if (CHESS[a][b] == 'B') {
        int temp = a;
        bool done = false;
        for (int c = temp; c <= 8; c++)
          if (CHESS[c][b] == 'W') {
            done = true;
            break;
          }
        if (done) continue;
        SB = min(SB, 8 - a);
      }
    }
  }
  cout << ((SA <= SB) ? "A\n" : "B\n");
  return 0;
  system("PAUSE");
}
