I was trying this problem, but cannot properly understand the problem statement.

More explicitly, this statement- " all *n* cities of Berland were connected by *n* two-way roads in the ring, i. e. each city was connected directly to exactly two other cities, and from each city it was possible to get to any other city. Government of Berland introduced one-way traffic on all *n* roads,"

Also, can anyone explain the sample test case 1 and 2