#include <stdio.h>
int main()
{
int i, n, ans;
for(i=1; i<=100; i++)
{
ans = 1;
n = i;
while( !(n%2) )
{
ans *= 2;
n /= 2;
}
printf("%d, ", ans);
}
system("pause");
return 0;
}
//2607374 2011-07-31 09:07:02 Accepted 2417 C 0 160 ylwh!
#include <stdio.h>
int main()
{
int a[] = {0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1
, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1
, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 64, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1,
16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4};
int n;
while(scanf("%d", &n) && n)
printf("%d\n", a[n]);
return 0;
}