#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[8];
  for (int i = 0; i < 8; i++) cin >> s[i];
  int minw = 100006, minb = 100006;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (s[i][j] == 'W') {
        int f = 0, c = 0;
        for (int k = i - 1; k >= 0; k--)
          if (s[k][j] != '.') {
            f = 1;
            break;
          } else
            c++;
        if (!f) minw = min(minw, c);
      }
      if (s[i][j] == 'B') {
        int f = 0, c = 0;
        for (int k = i + 1; k < 8; k++)
          if (s[k][j] != '.') {
            f = 1;
            break;
          } else
            c++;
        if (!f) minb = min(minb, c);
      }
    }
  }
  if (minw > minb)
    cout << "B";
  else
    puts("A");
  return 0;
}
