Increasing sequence golf


Step Limit : 30
Statement
You are given S contains only '1' - '5' surrounded by '[' and ']'.
Delete all elements that satisfy the below condition:
* There is a smaller digit behind it.

Constraints
* 1 ≤ |S| ≤ 15

Explanation of sample
[314152535]
xx_x_x_x__x
Sample Input
Sample Output
Contest ID
0009
Writer
admin
Publish date
2021/05/13 23:00:00
Solved
95
Best
10
Top player
mtsd