Raghu wants to design a converter such that when a user inputs a binary number it gets converted to Octal number & also the correspond alphabet to it.

Example- if a user inputs- 10101101
then the output is 255 BEE

Note : for decimal places there should be a space between the alphabetic signs
Ex- for input  101101101110.111
output -5556.7 EEEF G

A stands for 1, b for 2 , if the octal digit is 0 consider it as a space

SAMPLE INPUT
10101101

SAMPLE OUTPUT
255 BEE
bindict = {'000':0,'001':1,'010':2,'100':4,'101':5,'110':6,'111':7,'011':3}
binary = raw_input().split('.')

for index,value in enumerate(binary):
    arr = []
    if(index==0):   
        while(len(value)%3!=0):
            value='0'+value
        j = 1
        i = 0
        while(j<=len(value)):
            if(j%3==0):
                arr.append(value[i:j])
                i = j
            j+=1
        total = ''
        for k in arr:
            total+=str(bindict[k])
    if(index==1):
        total+='.'
        while(len(value)%3!=0):
            value=value+'0'
        j = 1
        i = 0
        while(j<=len(value)):
            if(j%3==0):
                arr.append(value[i:j])
                i = j
            j+=1
        for k in arr:
            total+=str(bindict[k])
    
    string = ''
    for i in total:
        if(i=='.'):
            string+=' '
        else:
            string+=chr(64+int(i))
print total+ ' '+string