program treeexe;
const
M=2000;
var VAZEL:array[1..M,1..2] of integer;
  k,a,b,i,j,N,nom:integer;
 begin
 write('vavedi broj dygi:');readln(N);
for i:=1 to N do
begin
for j:=1 to 2 do
 begin
write('Vavedete VAZEL[',i,',',j,']');
readln(Vazel[i,j]);
end;
end;
for i:=1 to n do
begin
  k:=VAZEL[i,1];
  for j:=1 to n do
begin
if (k=VAZEL[j,2]) then writeln('0 0') else
If (k<>VAZEL[j,2]) then
writeln('k=',k);
end;
end;
end.















































































































































