while(<>){
# $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}
}
cHJpbnQgJF5WOwp3aGlsZSg8Pil7CgkoJG4sICRtKSA9IHNwbGl0OwojCSRuID09IDEgYW5kIGRvIHtwcmludCAxOyBuZXh0fTsKIwkkbSA9IHNwcmludGYgIiViIiwgJG0gLSAxOwojCSRtID1+IHMvXi8wLyB3aGlsZSAkbiAtIDEgPiBsZW5ndGggJG07CiMJJG0gPX4gcy8uLyBwdXNoIEB7JCZ9LCArKyAkaSAvZWc7CiMJJCwgPSAkIjsKIwlwcmludCBAezB9LCIkbiIsIHNvcnQgeyRiIDw9PiAkYX0gQHsxfQoJfQ==