#include <bits/stdc++.h>
using namespace std;
int n, m;
int i, j, k;
int tree[110][26], dp[1010][110], word[110], fail[110], cnt = 0;
void solve() {
  int x;
  cin >> x;
  x &= 3;
  puts(x != 0 ? (x == 1 ? "0 A" : (x == 2 ? "1 B" : "2 A")) : "1 A");
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
