406195: GYM102307 I Integer Prefix

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Integer Prefixtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

The Unique Numerical Association of Language (UNAL) is an association created to conserve only numbers in different texts. In fact, numbers are so important for UNAL, that its lemma is: 'people can communicate only using digits'.

Mr. Potato Head, the head of the UNAL has assigned you a task to help them to achieve the goal of the association.

Given a text $$$T$$$ you have to find the longest non-empty prefix of $$$T$$$ consisting only of digits, for the UNAL this is enough to understand the whole text.

Input

Input consists of a single line with a text $$$T$$$ without spaces.

The length of the text is between $$$1$$$ and $$$2 * 10^5$$$

Output

Print one line with the longest non-empty numeric prefix of $$$T$$$, if there is no such prefix print $$$-1$$$ instead.

ExamplesInput
23082019UNAL
Output
23082019
Input
_1234567890
Output
-1

加入题单

上一题 下一题 算法标签: