add .gitignore
use graph structere
check reachable
fix
fix comment