\SetAlgoLined
\ForAll{elements of $S_1$}{
  remove an element e from $S_1$\;
  put e in the set $S_2$\;
  }
\lFor{i=1 \emph{\KwTo}max}{mark i}\;
\ForEach{$e$ in the set}{
  put $e$ in ${\cal E}$\;
  mark $e$\;
}
