const Main = input => {
  const inputParsed = input.split("\n");
  const number = Number(input[1]);
  if(inputParsed[1].length > number){
    console.log(inputParsed[1].subString(0,number))
  }else{
    console.log(inputParsed[1])
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
