#include <bits/stdc++.h>
using namespace std;
char b[8][8];
void moveA() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (b[i][j] == 'W' && b[i - 1][j] == '.') {
        b[i][j] = '.';
        b[i - 1][j] = '*';
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (b[i][j] == '*') {
        b[i][j] = 'W';
      }
    }
  }
}
void moveB() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (b[i][j] == 'B' && b[i + 1][j] == '.') {
        b[i][j] = '.';
        b[i + 1][j] = '*';
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (b[i][j] == '*') {
        b[i][j] = 'B';
      }
    }
  }
}
bool check() {
  for (int i = 0; i < 8; i++) {
    if (b[0][i] == 'W' || b[7][i] == 'B') {
      return 1;
    }
  }
  return 0;
}
int main() {
  while (cin >> b[0][0]) {
    for (int i = 0; i < 8; i++) {
      for (int j = (i == 0); j < 8; j++) {
        cin >> b[i][j];
      }
    }
    for (int i = 0; i < 16; i++) {
      if (i % 2 == 0) {
        moveA();
      } else {
        moveB();
      }
      if (check()) {
        if (i % 2 == 0) {
          cout << "A" << endl;
        } else {
          cout << "B" << endl;
        }
        break;
      }
    }
  }
  return 0;
}
