def x(*s):d=sorted(s);i=(0,1)[not d[0]];print(d[1+i],d[3],d[5],' ',d[0+i],d[(2+i)%3],d[4],sep='') x(2,6,5,1,9,7)x(1,9,5,0,8,3)x(1,2,3,4,5,6)
Standard input is empty
269 157 359 108 246 135
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!