solving scc_main_lemma_1_4