import math # 导入 math 模块
f = open("1int_testdata.txt")
line=0
mat=1
new_list=[0,0,0]
line = f.readline()
while line:
    a=0
    real_list=[]
    real_num=0
    end_num=0
    line=line.replace("\n", "")
    line_list=(line.split(' ', 1 ))
    new_list=[int(line_list[0]),int(line_list[1])]#共有兩個數的數組
    digits=list(map(int, str(new_list[0]))) #大數分成一位一個

    total_ditgit=len(str(new_list[0]))#查看數位
    digit_bei=total_ditgit-new_list[1]
    while a=0:
        end_num+=real_list[a]*math.pow(10,a)
        a-=1
    end_num=int(end_num)
    print(end_num)
    line = f.readline()
f.close()