1)
var s: string;
i, n,c: integer;
begin
read(n);
for i := 100 to 999 do
begin
s:=inttostr(i);
c:=(strtoint(s[1])+strtoint(s[2])+strtoint(s[3]));
if(n=c)then writeln(s);
end;
end.
2)
var s: string;
begin
read(s);
swap(s[1],s[s.Length]);
write(s);
end.