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 of length (i.e. a trigram), and a positive integer , create a string such that it contains in 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 . Your next line will contain .
Output Format
You should output the smallest string containing in different places.
Constraints
Sample Cases
Input 1
5
ana
Output 1
ananananana
Input 2
3
abc
Output 2
abcabcabc
Comments