$i=9;do{print((map{(sort map{abs}$_-$ARGV[0],$i-$ARGV[1])[-1]}1..9),"\n")}while--$i