var pos,neg: integer; i,k,x: integer; ev,un: integer; a,b: array [1..n] of integer;
begin for i := 1 to n do read(a[i]); k := 0; pos := 0; neg := 0; for i := 1 to n do begin ev := 0; un := 0; x := a[i]; if x <> 0 then if x > 0 then if (x < pos) or (pos = 0) then pos := x else else if (x > neg) or (neg = 0) then neg := x; x := abs(x); while x <> 0 do begin if odd(x) then un := un + 1 else ev := ev + 1; x := x div 10 end; if un = ev then begin k := k + 1; b[k] := a[i] end end;
writeln(pos,' ',neg); for i := 1 to k do write(b[i],' ') end.
procedure writesymbol(j:longint); begin write(chr(ord('a')+j-1)); end;
procedure print(x:longint); var z,h,p:longint; begin z := 0; p := 0; while true do begin p := p + 1; if b[p] = false then z := z + 1; if z = x then break; end; x := p; b[x] := true; writesymbol(x); end;
function fa_l(a,b:longint):longint; var s,h:longint; begin s := 1; for h := a to b do s := s * h; fa_l := s; end;
begin read(n,k,m);
d := fa_l(n-k+1,n-1);
for i := k downto 1 do begin print((m - 1) div d + 1); if m mod d = 0 then m := d else m := m mod d; d := d div (n - (k - i + 1)); end; end.
n = 20;
var
pos,neg: integer;
i,k,x: integer;
ev,un: integer;
a,b: array [1..n] of integer;
begin
for i := 1 to n do
read(a[i]);
k := 0;
pos := 0;
neg := 0;
for i := 1 to n do
begin
ev := 0;
un := 0;
x := a[i];
if x <> 0 then
if x > 0 then
if (x < pos) or (pos = 0) then
pos := x
else
else
if (x > neg) or (neg = 0) then
neg := x;
x := abs(x);
while x <> 0 do
begin
if odd(x) then
un := un + 1
else
ev := ev + 1;
x := x div 10
end;
if un = ev then
begin
k := k + 1;
b[k] := a[i]
end
end;
writeln(pos,' ',neg);
for i := 1 to k do
write(b[i],' ')
end.
b:array[1..26] of boolean;
procedure writesymbol(j:longint);
begin
write(chr(ord('a')+j-1));
end;
procedure print(x:longint);
var z,h,p:longint;
begin
z := 0;
p := 0;
while true do
begin
p := p + 1;
if b[p] = false then z := z + 1;
if z = x then break;
end;
x := p;
b[x] := true;
writesymbol(x);
end;
function fa_l(a,b:longint):longint;
var s,h:longint;
begin
s := 1;
for h := a to b do s := s * h;
fa_l := s;
end;
begin
read(n,k,m);
d := fa_l(n-k+1,n-1);
for i := k downto 1 do
begin
print((m - 1) div d + 1);
if m mod d = 0 then m := d else
m := m mod d;
d := d div (n - (k - i + 1));
end;
end.