https://liuxueyang.github.io/posts/codeforces/1540a/
CodeForces 1540A Great Graphs