Here we clearly need to identify sets of strings corresponding to the two parts of this language, but it is easy to see that no one context will suffice.
this can clearly be computed efficiently using a union-find algorithm, in time polynomial in |K| and |F |.