type arr = array of integer;
var c:arr;
procedure m_in(var m:arr) ;
var i,n:integer;
begin
read (n);
m := new integer[n+1];
for i:= 1 to n do read (m[i])
end;
procedure m_out(var m:arr) ;
var i,a,b:integer;
readln (a,b);
for i:= a to b do write(m[i],' ');
writeln;
m_in(c);
m_out(c)
end.
type arr = array of integer;
var c:arr;
procedure m_in(var m:arr) ;
var i,n:integer;
begin
read (n);
m := new integer[n+1];
for i:= 1 to n do read (m[i])
end;
procedure m_out(var m:arr) ;
var i,a,b:integer;
begin
readln (a,b);
for i:= a to b do write(m[i],' ');
writeln;
end;
begin
m_in(c);
m_out(c)
end.