Chef Loves to listen to remix songs, but currently he had already finished the entire playlist of remix songs.
As Chef is smart, so he thought let's make my own remix songs of the original songs.
Chef is not having much knowledge of making remix songs, so he came up with the simple technique in which he will pick the word which contains the smallest number of characters from the lyrics of the song, and then he will append that word to the start and end of the lyrics, also Chef will insert this word between every two words of the lyrics.
Note: While inserting a new word Chef will also insert extra white-spaces, so that every word in the final remixed lyrics is separated by space.
It is Recommended to use fast Input/Ouput techniques.

-----Input:-----
- The input contains the text $S$, which denotes the lyrics of the song.

-----Output:-----
- Print the Remixed, lyrics as done by Chef.

-----Constraints:-----
- $1 \leq Length of text $S$ \leq 10^7$

-----Sample Input:-----
Mai Hu Jiyaan

-----Sample Output:-----
Hu Mai Hu Hu Hu Jiyaan Hu

Difficulty: interview

Starter code:

Solutions:
m= 9999999
word=''
p= ''
try:
      s=input().split()
      for i in s:
            if(len(i) <= m):
                  m = len(i)
                  word = i
      p = word
      for i in s:
            p+= (' '+i+' '+ word)
      
      print(p)

              
except EOFError:

      pass

s=input()
s=s.split(" ")

# print(s)
a=[]
s1=[]
for _ in range(len(s)):
    if s[_]!='':
        s1.append(s[_])    
for _ in range(len(s1)):
    a.append(len(s1[_]))
# print(a)    
aa=a.index(min(a))
ss=s1[aa]
print(ss,end=" ")
for _ in range(len(s1)):
    print(s1[_],ss,end=" ")
    # print(ss,end=" ")    

from math import inf
from sys import stdin
input=stdin.readline
a=input().split()
mi=inf
ind=0
n=len(a)
for i in range(n):
    if mi>len(a[i]):
        mi=len(a[i])
        ind=i
for i in range(n):
    print(a[ind],a[i],end=" ")
print(a[ind])

# cook your dish here
s=list(input().split())
a=min(s,key=len)
for i in s:
    print(a,i,end=" ")
print(a)


l=input().split()
mins=l[0]
for s in l:
    if len(s)<len(mins):
        mins=s
ans=mins
for s in l:
    ans+=" "+s+" "+mins
print(ans)

def f(inp): 
    length = len(inp) 
    si = ei = 0
    min_length = length 
    min_start_index = max_length = max_start_index = 0
      
    # loop to find the length and stating index 
    # of both longest and shortest words 
    while ei <= length: 
        if (ei < length) and (inp[ei] != " "): 
            ei += 1
        else: 
            curr_length = ei - si 
              
            # condition checking for the shortest word 
            if curr_length < min_length: 
                min_length = curr_length 
                min_start_index = si 
                  
            # condition for the longest word  
            if curr_length > max_length: 
                max_length = curr_length 
                max_start_index = si 
            ei += 1
            si = ei 
              
    # extracting the shortest word using  
    # it's starting index and length      
    minWord = inp[min_start_index :  
                  min_start_index + min_length] 
      
    # extracting the longest word using  
    # it's starting index and length      
    maxWord = inp[max_start_index : max_length] 
      
    # printing the final result 
    return minWord
    #print("Minimum length word: ", minWord) 
    #print("Maximum length word: ", maxWord) 

s=input().strip()
w=f(s)
s=list(s.split())
print(w,end=' ')
for i in s:
    print(i,end=' ')
    print(w,end=' ')

lyrics = list(map(str, input().rstrip().split(" ")))
mini1 = lyrics[0]
for i in lyrics:
    if len(i) < len(mini1):
        mini1 = i
t = 0
remix = []
while True:
    try:
        remix.append(mini1)
        remix.append(lyrics[t])
        t+=1
    except IndexError:
        break
print(" ".join(remix), end="")

s=input().split()
k = min(s,key=len)
n= len(s)
print(k,end=" ")
for i in range(n):
    print(s[i],k,end=" ")

l=list(map(str,input().split()))
ma=float("inf")
for i in l:
    if(len(i)<ma):
        ma=len(i)
        v=i
n=len(l)
k=[]
for i in range(n):
    k.append(l[i])
    if(i!=n-1):
        k.append(v)
k.append(v)
k.insert(0,v)
st=" ".join(k)
print(st)


S = input().split()
N=len(S)
sml=len(S[0])
val=S[0]
for i in S:
    if len(i)<sml:
        sml=len(i)
        val=i
print(val,end=' ')
i=0
while i<N:
    print(S[i],val,end=' ')
    i+=1

# cook your dish here
s = input().strip()

s_arr = s.split()

res = "z" * 100000000
for ele in s_arr:
    if len(res) > len(ele):
        res = ele
    elif len(res) == len(ele):
        res = min(res, ele)
    
print(res, end = " ")
for ele in s_arr:
    print(ele, end = " ")
    print(res, end = " ")

str=input()
ss=str.split()
xcr=None
xcxc=None
for wd in ss:
    if xcxc is None:
        xcr= len(wd)
        xcxc=wd
    else:
        if(len(wd)<xcr):
            xcr=len(wd)
            xcxc=wd
            
print(xcxc,end=' ')
for wd in ss:
    print(wd,xcxc,end=' ')

s=list(input().split())
min=999999999
r=""
for i in range(len(s)):
    if(len(s[i])<min):
       min=len(s[i])
       r=s[i]
print(r,end=' ')
for i in s:
    print(i + " " + r,end=' ')
#print(r,min)

import math
def solve(s):
    li=s.split()
    n=len(li)
    l=len(li[0])
    m=""
    for i in range(1,n):
        if l>=len(li[i]):
            l=len(li[i])
            m=li[i]
    
    res=""
    res+=m
    for i in li:
        res+=" "
        res+=i
        res+=" "
        res+=m
    print(res)


def __starting_point():
    try:
        s=input().strip()
        solve(s)
    except:
        pass
__starting_point()

s = input()
l = s.split()
a = 1000000000000000000
smallest = 'z'*100000000
for i in range(0, len(l)):
    if len(l[i])<a:
        smallest = l[i]
        a = len(l[i])
ll = []
for i in range(len(l)):
    print(smallest, end=' ')
    print(l[i], end=' ')
print(smallest, end='')

# cook your dish here
a=list(map(str, input().split()))
b=[]
for j in a:
    b.append(len(j))
x=b.index(min(b))
y=a[x]
i=0
while(i<len(a)):
    print(y,end=' ')
    print(a[i],end=' ')
    i+=1
print(y)


lst=input().split()
m=min(lst, key=len)
for i in range(len(lst)):
    print(m,lst[i],end=" ")
print(m)

l=list(map(str,input().split()))
ma=float("inf")
for i in l:
    if(len(i)<ma):
        ma=len(i)
        v=i
n=len(l)
k=[]
for i in range(n):
    k.append(l[i])
    if(i!=n-1):
        k.append(v)
k.append(v)
k.insert(0,v)
st=" ".join(k)
print(st)


x=[str(x)for x in input ().split()]
y=x[:]
x.sort(key=len)
ele=x[0]
leng=len(x)
for i in range(0,leng):
 print(ele+" "+y[i],end=" ")
print(ele)



S=list(input().split())
min=S[0]
ml=len(S[0])
ans=[]
for i in S:
    if len(i)<ml:
        ml=len(i)
        min=i
for j in range(len(S)):
    print(min,end=" ")
    print(S[j],end=" ")
print(min)

try:
    str1=list(map(str,input().rstrip().split()))
    z=[]
    m=[]
    for i in range(len(str1)):
        a=len(str1[i])
        m.append(a)
    k=min(m)
    l=m.index(k)
    for i in range(len(str1)):
        z.append(str1[i])
        z.append(str1[l])
    z.insert(0,str1[l])
    print(*z)
except:pass


try:
    a=input().split()
    l=[*[len(i) for i in a]]
    b=a[l.index(min(l))]
    print(b+" " +" {} ".format(b).join(a)+ " " +b)
except: pass


s = list(map(str,input().split()))
res = min(s,key = len)
for i in range(len(s)):
    print(res,s[i],end=' ')
print(res)