这题难度中等多少有点离谱

while True:
    try:
        strings, k = input(), int(input())
        print(strings[:k])
    except EOFError:
        break