POJ 1011 sticks, DFS