4 5 1 2 2 3 3 4 4 1 2 4 3 1 5 2 2 3 2 1 2
Connected Disconnected Connected
N<=100000 M<=200000 K<=100000