3977. Expands shorthand notations

Naive循环字符串

时间限制:2000 ms

内存限制:512 MiB

题面

Write a program that expands shorthand notations like a-z in the string s1s_1 into the equivalent complete list abc...xyz in s2s_2. Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. Arrange that a leading or trailing - is taken literally.

You can assume that the input string does not exceed 1010, only contains letters of both cases, digits, and -.

样例

输入

a-z

输出

abcdefghijklmnopqrstuvwxyz

输入

a-b-c

输出

abc

输入

a-z0-9

输出

abcdefghijklmnopqrstuvwxyz0123456789

输入

-a-z

输出

-abcdefghijklmnopqrstuvwxyz

输入

abcA-C

输出

abcABC