#include <bits/stdc++.h>
using namespace std;
char G[8][10];
int A = INT_MAX, B = INT_MAX;
int main() {
  for (int i = 0; i < (8); i++) scanf("%s", G[i]);
  for (int i = 0; i < (8); i++)
    for (int j = 0; j < (8); j++) {
      if (G[i][j] != '.') {
        int d = (G[i][j] == 'B') - (G[i][j] == 'W'), k = i + d;
        while (k < 8 && k >= 0 && G[k][j] == '.') k += d;
        if (k == -1 || k == 8) {
          if (G[i][j] == 'W')
            A = min(A, i);
          else
            B = min(B, 7 - i);
        }
      }
    }
  puts((A > B) ? "B" : "A");
  return 0;
}
