CF594E Cutting the Line

Description

You are given a non-empty line $ s $ and an integer $ k $ . The following operation is performed with this line exactly once: - A line is split into at most $ k $ non-empty substrings, i.e. string $ s $ is represented as a concatenation of a set of strings $ s=t_{1}+t_{2}+...+t_{m} $ , $ 1

Input Format

The first line of the input contains string $ s $ ( $ 1

Output Format

In the single line print the lexicographically minimum string $ s' $ which can be obtained as a result of performing the described operation.