function main(arg) {
	arg = arg.trim().split(/\n/);
  	var num = Number(arg[0]),
        word = arg[1],
        long = arg[1].length;
  	
  	if (num != 0) {
      	var words = [],
            ary_new = [],
            out,
            out_parts,
            abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

      	for (var i = 0; i < long; i ++) {
			words.push(word[i]);
        }
        for (var i = 0; i < num; i++) {
            ary_new.push(words[i]);
            out = ary_new.reduce((all, n) => all + n)
        }
      	console.log(words[num])
      	console.log(words[num] + abc.substr(num + 1, num) + words[num + num + 1] + out)
    } else {
      	console.log(words)
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));