#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int substr( char *t, const char *s, int pos, int len )
{
    if( pos < 0 || len < 0 || len > strlen(s) )
        return -1;
    for( s += pos; *s != '\0' && len > 0; len-- )
        *t++ = *s++;
    *t = '\0';
    return 0;
}
int main() {
    int K;
    char S[110];
    char S2[110];
    char S4[]="...";
    scanf("%d",&K);
    scanf("%s",&S);
    if(strlen(S)>K)
    {
        substr(S2,S,0,K);
        printf("%s\n",strcat(S2,S4));
    } else{
        printf("%s\n",S);
    }

    return 0;
}