CF1133F2 Spanning Tree with One Fixed Degree

Description

You are given an undirected unweighted connected graph consisting of $ n $ vertices and $ m $ edges. It is guaranteed that there are no self-loops or multiple edges in the given graph. Your task is to find any spanning tree of this graph such that the degree of the first vertex (vertex with label $ 1 $ on it) is equal to $ D $ (or say that there are no such spanning trees). Recall that the degree of a vertex is the number of edges incident to it.

Input Format

N/A

Output Format

N/A

Explanation/Hint

The picture corresponding to the first and second examples: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1133F2/517159ebac5fb796da2e35eb5deb42cb16b19928.png) The picture corresponding to the third example: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1133F2/5ec8b5eeba4dc997a4e457a85e595860b2a0bfe0.png)