k=int(eval(input()))

s=eval(input())

if len(s)>k:

  print((s[:k]+'...'))

else:

  print(s)
k=int(eval(input()))

s=eval(input())

l=len(s)

ans=''

for i in range(k):

  ans+=s[i]

  if i==l-1:

    break

else:

  ans+='...'

print(ans)
k = int(eval(input()))
s = eval(input())
if len(s) > k:
    print((s[:k] + "..."))
else:
    print(s)

k = int(eval(input()))
s = eval(input())
l = len(s)
ans = ""
for i in range(k):
    ans += s[i]
    if i == l - 1:
        break
else:
    ans += "..."
print(ans)

-if len(s) > k: -    print((s[:k] + "...")) +l = len(s) +ans = "" +for i in range(k): +    ans += s[i] +    if i == l - 1: +        break -    print(s) +    ans += "..." +print(ans)