main=interact f f(a:x)|b:c<-f x=[a..b]++reverse[b..a]++c f x=x