#include <bits/stdc++.h>
using namespace std;
long long getCategory(long long x) {
  x %= 4;
  if (x == 0) return 0;
  if (x == 1) return 3;
  if (x == 2) return 1;
  return 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long x;
  cin >> x;
  long long maxi = 0;
  for (int i = 0; i <= 2; i++) {
    maxi = max(maxi, getCategory(x + i));
  }
  for (int i = 0; i <= 2; i++) {
    if (maxi == getCategory(x + i)) {
      cout << i << " " << (char)(3 - getCategory(x + i) + 'A') << "\n";
    }
  }
  return 0;
}
