open List let l=ref[]and s=String.length;;try while 1=1 do l:=read_line()::!l done with _->iter print_endline(sort(fun a b->match s a-s b with 0->compare a b|x->x)!l)