const fi='xau.inp'
fo='xau.out'
var f1,f2:text;
a:array[1..100]of string;
i,d:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,a[n]);
end;
for i:=1 to n do
begin
for j:=1 to length(a[i]) do
a[i][j]:=upcase(a[i][j]);
end;
for i:=1 to n do
writeln(f2,length(a[i]),' ',a[i]);
close(f1);
close(f2);
end.