uses crt;
var s,s1,s2:string;
i,d:integer;
begin
clrscr;
readln(s);
s1:=''
s2:=''
d:=length(s);
for i:=1 to d do
begin
if s[i] in ['0'..'9'] then s1:=s1+s[i];
if (s[i] in ['a'..'z']) or (s[i] in ['A'..'Z']) then s2:=s2+s[i];
end;
writeln('Xau chua cac ki tu so la: ',s1);
writeln('Xau chua cac ki tu chu la: ',s2);
readln;
end.