Get a tree#978

Get a tree

1 second
128 megabytes
Very easy

A connected undirected graph without loops or multiple edges is given. It is allowed to delete edges from the graph. The goal is to obtain a tree.

Input

The first line contains two integers (1 \leq n \leq 100) and — the number of vertices and the number of edges in the graph. The next pairs of integers represent the edges. It is guaranteed that the graph is connected.

Output

Print n - 1 pairs of integers — the edges that form a tree. The edges can be printed in any order.

Examples

Example 1

Loading
Loading