print~~grep$c[$_]<$c[$j=$_+1]&&(@c[$_,$j]=@c[$j,$_],$\.=" $_ $j"),(0..<>)x(@c=glob<>)