#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int main(int argc, char *argv[]) {

	char line[128];
	fgets(line, 128, stdin);
	int num = atoi(line);
	fgets(line, 128, stdin);
	char *p = line;

	if (num >= strlen(line)) {
		printf("%s", line);
	} else {
		write(1, line, num);
		printf("...\n");
	}

    return EXIT_SUCCESS;
}

