#!perl -p ${$a=s/0*.{@{+}}/$n=oct b.$&;1/e+s/.{$n}//;$a+=(@f=($a,@f))[1]until$a>($v=oct b.$&);print sort{1}1,map$v+0<=>($v%=$_),@f}while@f=/1/