Problems

# Reverse me!

Vasya the boy likes to reverse the oriented graphs. Help him in it.

#### Input

The first number is n (1n50000) - the number of vertices in a graph. The next n lines contain the graph in the form of adjacency list: the i-th line contains the list of vertices in increasing order that are adjacent to i-th vertex. The numeration of vertices starts with one. It is guaranteed that the number of edges in a graph is no more than 50000.

#### Output

Print the reverse graph in the same format like the input graph.

Time limit 1 second
Memory limit 128 MiB
Input example #1
```4
2 3
3

2
```
Output example #1
```4

1 4
1 2

```
Input example #2
```2
2
1
```
Output example #2
```2
2
1
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.88657004,"math_prob":0.880142,"size":639,"snap":"2020-10-2020-16","text_gpt3_token_len":179,"char_repetition_ratio":0.14173229,"word_repetition_ratio":0.015748031,"special_character_ratio":0.28482002,"punctuation_ratio":0.071428575,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9814183,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-29T03:26:36Z\",\"WARC-Record-ID\":\"<urn:uuid:cb5e3f7c-0f0c-437b-9422-9d9e29fc567a>\",\"Content-Length\":\"7461\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8388a5b6-cf23-4392-b7e1-cea3cb1496f7>\",\"WARC-Concurrent-To\":\"<urn:uuid:9d5d1c31-ffa9-493f-99cb-146950017c4d>\",\"WARC-IP-Address\":\"104.18.35.20\",\"WARC-Target-URI\":\"https://www.e-olymp.com/en/problems/4854\",\"WARC-Payload-Digest\":\"sha1:KV65NGHUBIYUQK3IXX4DIKNCKOMHLUKT\",\"WARC-Block-Digest\":\"sha1:QCEUGGSBCXTUS5LPTLR6YQ7O6OVRYXVU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875148375.36_warc_CC-MAIN-20200229022458-20200229052458-00388.warc.gz\"}"}