solving scc_lemma_4