K = int(eval(input()))

S = eval(input())

def result(K: int, S: str) -> str:

    s_len = len(S)

    if s_len <= K:

        return S

    else:

        answer = ''

        i = 0

        while i <= K-1:

            answer += S[i]

            i += 1

        answer += '...'

        return answer

print((result(K, S)))

K = int(eval(input()))

S = eval(input())

def result(K: int, S: str) -> str:

    if len(S) <= K:

        return S

    else:

        answer = S[:K]

        return answer + '...'

print((result(K, S)))

K = int(eval(input()))
S = eval(input())


def result(K: int, S: str) -> str:
    s_len = len(S)
    if s_len <= K:
        return S
    else:
        answer = ""
        i = 0
        while i <= K - 1:
            answer += S[i]
            i += 1
        answer += "..."
        return answer


print((result(K, S)))

K = int(eval(input()))
S = eval(input())


def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + "..."


print((result(K, S)))

-    s_len = len(S) -    if s_len <= K: +    if len(S) <= K: -        answer = "" -        i = 0 -        while i <= K - 1: -            answer += S[i] -            i += 1 -        answer += "..." -        return answer +        answer = S[:K] +        return answer + "..."