((input) => {
    const lines = input.split("\n");
    const [A, B] = lines[0].split(" ").map(x => x | 0);
    const S = lines[1];

    console.log(S.match(new RegExp("\\d{" + A +"}-\\d{" + B + "}")))
})(require("fs").readFileSync("/dev/stdin", "utf8"));
//})(``);