print$a[$_&-$_]//=++$%for 1..<>