directed graph breath frist search case