/*
报数方式为:
A B C D E F G H
1 2 3 4 5 6 7 8
14 13 12 11 10 9
15 16 17 18 19 20 21 22
28 27 26 24 23 21
29 30 ..........
*/
#include<stdio.h>
#define N 8
int main()
{
int jg,i=0;
unsigned long num;
char pop[N],zm='A';
while(i<N) pop[i++] = zm++ ;
--i;--zm;
while( scanf("%ul",&num) != EOF )
{
fflush(stdin) ;
jg = num%14 ;
if ( jg==0 || jg==2 )
printf ( "B先报到:%u\n", num ) ;
else if ( jg>8 )
printf ( "%c先报到:%u\n", pop[15-jg], num) ;
else printf ( "%c先报到:%u\n", pop[jg-1], num) ;
}
return 0;
}