from collections import defaultdict, deque

import sys

import heapq

import bisect

import itertools

import queue

import copy

import time

sys.setrecursionlimit(10**8)

INF = float('inf')

mod = 10**9+7

eps = 10**-7



def inp(): return int(sys.stdin.readline())



def inpl(): return list(map(int, sys.stdin.readline().split()))



def inpl_str(): return list(sys.stdin.readline().split())



def inpl_strl(): return list(sys.stdin.readline())



K = inp()

S = eval(input())

if K >= len(S):

    print(S)

else:

    print(f'{S[:K]}...')
K = int(eval(input()))

S = list(eval(input()))

if K >= len(S):

    print((''.join(S)))

    

else:

    s = ''.join(S[:K])

    print(f'{s}...')
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time

sys.setrecursionlimit(10**8)
INF = float("inf")
mod = 10**9 + 7
eps = 10**-7


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


def inpl_str():
    return list(sys.stdin.readline().split())


def inpl_strl():
    return list(sys.stdin.readline())


K = inp()
S = eval(input())
if K >= len(S):
    print(S)
else:
    print(f"{S[:K]}...")

K = int(eval(input()))
S = list(eval(input()))
if K >= len(S):
    print(("".join(S)))
else:
    s = "".join(S[:K])
    print(f"{s}...")

-from collections import defaultdict, deque -import sys -import heapq -import bisect -import itertools -import queue -import copy -import time - -sys.setrecursionlimit(10**8) -INF = float("inf") -mod = 10**9 + 7 -eps = 10**-7 - - -def inp(): -    return int(sys.stdin.readline()) - - -def inpl(): -    return list(map(int, sys.stdin.readline().split())) - - -def inpl_str(): -    return list(sys.stdin.readline().split()) - - -def inpl_strl(): -    return list(sys.stdin.readline()) - - -K = inp() -S = eval(input()) +K = int(eval(input())) +S = list(eval(input())) -    print(S) +    print(("".join(S))) -    print(f"{S[:K]}...") +    s = "".join(S[:K]) +    print(f"{s}...")