//1
Var
f:text;
s,s1:string;
begin
readln(s);
assign(f,'text.txt');
reset(f);
while not Eof(f) do
read(f,s1);
close(f);
s:=s1+s;
assign(f,'text.txt');
rewrite(f);
write(f,s);
close(f);
end.
//2
Var
f:text;
s1,s2:string;
begin
assign(f,'text1.txt');
reset(f);
while not Eof(f) do
read(f,s1);
close(f);
assign(f,'text.txt');
reset(f);
while not Eof(f) do
read(f,s2);
close(f);
s1:=s1+s2;
assign(f,'text1.txt');
rewrite(f);
write(f,s1);
close(f);
end.