#1004
Unrated
NAPOR
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Author: Matija Osrečki

Little Mirko wasn’t paying attention in math class, so the teacher has decided to give him a tedious assignment to solve during the weekend. The teacher has given him a text consisting of N lines, containing only digits and lower case letters of the English alphabet. Mirko has to find all numbers in the text and print them out in a nondecreasing sequence. He also has to omit any leading zeros that the numbers may have in the text. The numbers can be uniquely determined by scanning through the text and always taking the largest possible number, i.e. delimited only by letters or line beginnings/ends. For example, the solution of 01a2b3456cde478 is 1, 2, 478, 3456. Since Mirko is as slow as the snail from the previous task, he has asked you to write him a program to quickly solve his assignment, so that he can go play with Slavko as soon as possible.

입력

The first line of input contains the integer N (1 ≤ N ≤ 100), the number of lines of the text. The next N lines contain the text, consisting exclusively of lowercase English letters and decimal digits. Each line of the text is at most 100 characters long.

출력

The output must contain M lines, where M is the number of numbers found in the provided text. Each line must contain a single number from the text. The numbers must be arranged in a nondecreasing sequence. Note: The test data will ensure that M will never exceed 500.

예제 입력 1

2
lo3za4
01

예제 출력 1

1
3
4

예제 입력 2

4
43silos0
zita002
le2sim
231233

예제 출력 2

0
2
2
43
231233

예제 입력 3

4
01bond
02james007
03bond
04austinpowers000

예제 출력 3

0
1
2
3
4
7
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.