print $^V; while(<>){ ($n, $m) = split; # $n == 1 and do {print 1; next}; # $m = sprintf "%b", $m - 1; # $m =~ s/^/0/ while $n - 1 > length $m; # $m =~ s/./ push @{$&}, ++ $i /eg; # $, = $"; # print @{0},"$n", sort {$b <=> $a} @{1} }