We consider the shift transformation on the space of infinite sequences over
a finite alphabet endowed with the invariant product measure, and examine the
presence of a \emph{hole} on the space. The holes we study are specified by the
sequences that do not contain a given finite word as initial sub-string. The
measure of the set of sequences that do not fall into the hole in the first $n$
iterates of the shift is known to decay exponentially with $n$, and its
exponential rate is called \emph{escape rate}. In this paper we provide a
complete characterization of the holes with maximal escape rate. In particular
we show that, contrary to the case of equiprobable symbols, ordering the holes
by their escape rate corresponds to neither the order by their measure nor by
the length of the shortest periodic orbit they contain. Finally, we adapt our
technique to the case of shifts endowed with Markov measures, where preliminary
results show that a more intricate situation is to be expected.