CF402C Searching for Graph

Description

Let's call an undirected graph of $ n $ vertices $ p $ -interesting, if the following conditions fulfill: - the graph contains exactly $ 2n+p $ edges; - the graph doesn't contain self-loops and multiple edges; - for any integer $ k $ ( $ 1

Input Format

The first line contains a single integer $ t $ ( $ 1

Output Format

For each of the $ t $ tests print $ 2n+p $ lines containing the description of the edges of a $ p $ -interesting graph: the $ i $ -th line must contain two space-separated integers $ a_{i},b_{i} $ ( $ 1