package main

import (
	"bufio"
	"errors"
	"fmt"
	"log"
	"os"
	"strconv"
	"unicode/utf8"
)

var (
	errmsg2 = "value is too low"
	errmsg1 = "value is too large"
	k       = 0
	s       = ""
	svalue  = 0
)

func main()  {

	scanner1 := bufio.NewScanner(os.Stdin)
	scanner1.Scan()
	str1 := scanner1.Text()
	i, _ := strconv.Atoi(str1)
	k = i

	scanner2 := bufio.NewScanner(os.Stdin)
	scanner2.Scan()
	s = scanner2.Text()
	svalue = utf8.RuneCountInString(s)

	if k <= 100 && k >= 1 {
		if svalue <= 100 && svalue >= 1{
			if svalue <= k {
				fmt.Println(s)
			}else {
				fmt.Println(s[:k] + "...")
			}

		}else {
			if err := doError1(svalue); err != nil{
				switch err.Error() {
				case errmsg1:
					log.Fatalf(errmsg1)

				case errmsg2:
					log.Fatalf(errmsg2)
				}
			}
		}

	}else {
		if err := doError1(k); err != nil{
			switch err.Error() {
			case errmsg1:
				log.Fatalf(errmsg1)

			case errmsg2:
				log.Fatalf(errmsg2)
			}
		}
	}
}

func doError1(a int) error{
	var b bool
	switch b {
	case a < 1:
		return errors.New(errmsg1)

	case a > 100:
		return errors.New(errmsg2)
	}
	return nil
}

