#include<stdio.h>
int main()
{
    int a,b,i,j,s=0,k=0,m;
    scanf("%d",&a);
    int A=a;
    for(i=1; ;i++)
    {
        b=a%10;
        k++;
        a=a/10;
        if(k==1)s=b;
        if(k==2)m=b;
        if(k==3)j=b;
        if(k==3)break;
    }
    if(A>999)
    {
        printf("ABD\n");
        printf("The %d-th round of AtCoder Beginner Contest is labeled as ABD%d%d%d.\n",A,j,m,s+1);

    }
    else
    {

        printf("ABC\n");
        printf("The %d-th round of AtCoder Beginner Contest is labeled as ABC%d%d%d.\n",A,j,m,s);
    }
    return 0;
}
