main=interact$foldl(%)"" (a:b)%'?'=b%a p%c=[x|x<-")]}",x>c,x<[c..]!!3]++p++[c]