program dosadan;
var a,b,c,d:integer;
st1,st2,st3,st4:string;
ch1,ch2,dd:char;
begin
st3:='';
readln(a);
for b:=1 to a do begin
read(ch1,ch2); if b<a then read(dd);
st2:=ch1+ch2;
st4:=st3;
if st2='1E' then st3:=st3+'.';
if st2='1F' then st3:=st3+'.';
if st2='1C' then st3:=st3+'.';
if st2='1D' then st3:=st3+'.';
if st2='1A' then st3:=st3+'.';
if st2='1B' then st3:=st3+'.';
if st2='18' then st3:=st3+'.';
if st2='19' then st3:=st3+'.';
if st2='16' then st3:=st3+'.';
if st2='17' then st3:=st3+'.';
if st2='10' then st3:=st3+'.';
if st2='11' then st3:=st3+'.';
if st2='12' then st3:=st3+'.';
if st2='13' then st3:=st3+'.';
if st2='14' then st3:=st3+'.';
if st2='15' then st3:=st3+'.';
if st2='16' then st3:=st3+'.';
if st2='17' then st3:=st3+'.';
if st2='18' then st3:=st3+'.';
if st2='19' then st3:=st3+'.';
if st4=st3 then st3:=st3+'-';
end;
writeln(st3);
end.