An Erdős--Szekeres type result for words with repeats | Synapse