Graph availability task

Solution #1