A Very Easy Graph Problem

HDU - 6832