#include<stdio.h>
#define LL long long
#define N 233333
#define mod 11111111
inline int pow(int a,LL x) {
int ret=1;
while(x) {
if(x&1) ret=(1LL*ret*a)%mod;
x>>=1; a=(1LL*a*a)%mod;
}
return ret;
}
inline int f(LL x) {
if(x==0||x==1) return 1;
return 1LL*pow(2,(3-x%3)%3)*pow(3,(x-(3-x%3)%3*2)/3)%mod;
}
int main() {
for(int i=0;i<=N;i++) {
printf("%d\n",f(i));
}
}
1 0 0
2 1 0
3 0 1
4 2 0
6 1 1
9 0 2
12 2 1
18 1 2
27 0 3
36 2 2
54 1 3
81 0 4
108 2 3
162 1 4
243 0 5
324 2 4
486 1 5
729 0 6
972 2 5
1458 1 6
2187 0 7
2916 2 6
4374 1 7
6561 0 8
8748 2 7
13122 1 8
19683 0 9
26244 2 8
39366 1 9
59049 0 10