def f(x):
while"1'"in`map(bin,x)`:x.pop()
for x in [14, 42, 2324, 97090, 4080622, 171480372], [42, 14, 42, 2324], [7,14,42], [], [171480372, 13, 14, 42], [42, 14, 42, 43, 41, 4080622, 171480372]:
f(x);print x
ZGVmIGYoeCk6CiB3aGlsZSIxJyJpbmBtYXAoYmluLHgpYDp4LnBvcCgpCgpmb3IgeCBpbiBbMTQsIDQyLCAyMzI0LCA5NzA5MCwgNDA4MDYyMiwgMTcxNDgwMzcyXSwgWzQyLCAxNCwgNDIsIDIzMjRdLCBbNywxNCw0Ml0sIFtdLCBbMTcxNDgwMzcyLCAxMywgMTQsIDQyXSwgWzQyLCAxNCwgNDIsIDQzLCA0MSwgNDA4MDYyMiwgMTcxNDgwMzcyXToKICAgIGYoeCk7cHJpbnQgeA==
[14, 42, 2324, 97090, 4080622, 171480372]
[42, 14, 42, 2324]
[]
[]
[171480372]
[42, 14, 42]