Problem:
Score: 200 points

Problem Statement

We have a string S consisting of lowercase English letters.

If the length of S is at most K, print S without change.

If the length of S exceeds K, extract the first K characters in S, append ... to the end of them, and print the result.

Constraints

K is an integer between 1 and 100 (inclusive).

S is a string consisting of lowercase English letters.

The length of S is between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

K
S

Output

Print a string as stated in Problem Statement.

Sample Input 1

7
nikoandsolstice

Sample Output 1

nikoand...

nikoandsolstice has a length of 15, which exceeds K=7.

We should extract the first 7 characters in this string, append ... to the end of them, and print the result nikoand....

Sample Input 2

40
ferelibenterhominesidquodvoluntcredunt

Sample Output 2

ferelibenterhominesidquodvoluntcredunt

The famous quote from Gaius Julius Caesar.

Solution in C++ (GCC 9.2.1) (judge verdict: Wrong Answer)

#include<bits/stdc++.h>
#define console
using namespace std;
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define siz(x) ((int)(x).size())
#define full(v) v.begin(), v.end()
#ifndef console
ifstream fin("data.in");
ofstream fout("data.out");
#else
#define fin cin
#define fout cout
#endif
#define MAX(x, y) ((a) > (b) ? (a) : (b))
#define usain_bolt() (ios_base::sync_with_stdio(false), \
                      fin.tie(NULL), fout.tie(NULL))
const long long oo = 0x3f3f3f3f;
const double PI = acos(-1);

const int di[4] = {1, 0, -1, 0};
const int dj[4] = {0, 1, 0, -1};

typedef long long ll;
typedef unsigned int ui;

int main()
{
    usain_bolt();
    int k;
    string s;
    fin >> k >> s;
    if (s.size() > k)
    {
          for (int i = k; i < s.size(); ++i)
                  s[i] = '.';
    }
    fout << s;
#ifndef console
    fin.close(), fout.close();
#else
#undef fin cin
#undef fout cout
#endif // console
    return 0;
}