#!/bin/bash

read K
read S

s_no_nagasa=$(echo $S | awk '{print length($0)}')

if [ ${s_no_nagasa} -le $K ]; then
  echo $S
elif [ ${s_no_nagasa} -gt $K ]; then
  echo "$(echo $S | awk -v K=${K} '{print substr($0, 0, K)}')..."
fi