Imports System

Module Test1
Sub Main()
dim Input as string, Output as string, S_base(10) As String,A_int as integer
Input ="" : Output ="" : A_int=0
Do
Input=Console.ReadLine()
If input Is Nothing Then exit do
S_base(A_int)=Input
A_int=A_int+1
Loop
Dim a As Integer, A_out As String
a = S_base(0)
If a > 999 Then
A_out = "ABD" & a.ToString.PadLeft(3, "0"c)
Else
A_out = "ABC" & a.ToString.PadLeft(3, "0"c)
End If
Output=A_out.tostring
Console.WriteLine(Output)
End sub
End Module