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

int main(void) {
	int K;
	char S[1024];
	if (scanf("%d", &K) != 1) return 1;
	if (scanf("%512s", S) != 1) return 1;
	if (strlen(S) > (unsigned int)K) strcpy(S + K, "...");
	puts(S);
	return 0;
}
