I got a fun problem.

Define the alphabet $\mathcal{A}=\{0,1,2\}$ and the set $\mathcal{A}^{\leq n}=\{ x_1x_2\ldots x_n: x_i\in \mathcal{A}\}$ of words of length $n,$ for each $n\in\mathbb{N}.$

Suppose that for each $n\in \mathbb{N}$ somebody selects a set $X_n$ of $2^n$ points of $\mathcal{A}^{\leq n}.$

Is it true that there exist a function of linear growth $f:\mathbb{N}\to \mathbb{N},$ a set $\{y^{n}\}_{n\in K} \subset \mathcal{A}^{\mathbb{N}}$ of infinite cardinality with $K\subset \mathbb{N}$ and for each $n\in K$ a set $Y_n\subset X_n$ with cardinality $|Y_n|\leq f(n)$ such that any sub word of $y^n$ with length $n$ belongs to $Y_n?$

(My unique intuition is that it is false. And that it should be possible to create by hand the bad sets $X_n,$ however the proof does not seem clear to me yet. I also think that it could be true a.s., my only guess is to try to use a kind of Borel-Cantelli lemma.)