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

int main() {
  int k;
  char buf[120];
  char *s, *tmp;
  scanf("%d", &k);
  int i = 0;
  s = (char*)malloc(sizeof(char*));
  while(fgets(buf,sizeof(buf),stdin)!='\0'){
    sscanf(buf,"%s",s);
  };
  //printf("%d",(int)strlen(s));
  if((int)(strlen(s))-k>0) {
    for(i=0; i<k; i++) {
      printf("%c", buf[i]);
    }
    printf("...\n");
  } else {
    printf("%s",buf);
  }
  return 0;
}
