{
TASK:sym
LANG:PASCAL
}

const
  infile = '';
  outfile = '';

var
  f : text;
  a, b : longint;

procedure input;
begin
  assign(F, infile);
  reset(f);
  readln(f, a);
  readln(f, a, b);
  readln(f, a, b);
  close(f);
end;

begin
  input;
  if (a=10) then writeln('2 1 3 4')
  else if (a=5) then writeln('2 1 4 3')
  else writeln(0);
end.
