#include <bits/stdc++.h>
using namespace std;
void f(int x) {
  int n = x % 4;
  if (n == 1) {
    cout << 0 << " "
         << "A" << endl;
    return;
  }
  if (n == 2) {
    cout << 1 << " "
         << "B" << endl;
    return;
  }
  if (n == 3) {
    cout << 2 << " "
         << "A" << endl;
    return;
  }
  if (n == 0) {
    cout << 1 << " "
         << "A" << endl;
    return;
  }
}
int main() {
  int x;
  cin >> x;
  f(x);
  return 0;
}
