#C2490. Delivery Network Connectivity

    ID: 45812 Type: Default 1000ms 256MiB

Delivery Network Connectivity

Delivery Network Connectivity

In a delivery network, there are n delivery points numbered from 1 to n and m bidirectional routes connecting these points. The network is said to be connected if every delivery point can be reached from any other delivery point.

Formally, given a graph \(G=(V,E)\) where \(|V|=n\) and \(|E|=m\), the graph is connected if for every two distinct vertices \(u,v\), there exists a path from \(u\) to \(v\).

Your task is to determine whether the delivery network is connected or not.

inputFormat

The first line contains two integers n and m (1 ≤ n, m) representing the number of delivery points and the number of routes respectively.

Each of the following m lines contains two integers u and v (1 ≤ u, v ≤ n) which indicates that there is a bidirectional route between delivery points u and v.

outputFormat

Output a single line containing "Connected" if every delivery point is reachable from any other; otherwise, output "Disconnected".

## sample
5 4
1 2
2 3
3 4
4 5
Connected