#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int main() {
  int a;
  cin >> a;
  int x = a % 4;
  if (x == 1) {
    printf("0 A\n");
  } else if (x == 2) {
    printf("1 B\n");
  } else if (x == 3) {
    printf("2 A\n");
  } else {
    printf("1 A\n");
  }
}
