Eight Trigrams (1 Point)


Problem Statement

Neji Hyuga was studying triagrams and palms, which are three letter words. You have been asked to do the question which Neji could not do.

Given a string ss of length 33 (i.e. a trigram), and a positive integer nn, create a string such that it contains ss in nn different places, and it is as small as possible. It can be proven there is exactly one unique string with these properties.

Input Format

Your first line will contain nn. Your next line will contain ss.

Output Format

You should output the smallest string containing ss in nn different places.

Constraints

  • 1≤n≤1041 \leq n \leq 10^4

Sample Cases

Input 1
5
ana
Output 1
ananananana
Input 2
3
abc
Output 2
abcabcabc

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.