#include<stdio.h>
void power3(unsigned long result[]);
void print_result(unsigned long result[]);
int main(void)
{ unsigned long result[8]={0};
power3(result);
return 0; }
void power3(unsigned long result[])
{ for(int i=1;i<=99;i++)
{ unsigned long a=1;
for(int j=0;j<i;j++) { a=a*3; }
for(int b=0;b<8;b++) { result[b]=0;}
for(int c=0;c<8;c++) { result[c]=a%100000000; a=a/010000000;}
print_result(result); } }
void print_result(unsigned long result[])
{ int top_level=1;
for(int i=7;i>=0;i--) { if(result[i]!=0) top_level=0; }
for(int d=1;d<=99;d++)
{ if(top_level==0)
for(int i=7;i>=0;i--)
{ if(result
[i
]!=0) printf("%lu",result
[i
]); } } break; } }
I2luY2x1ZGU8c3RkaW8uaD4Kdm9pZCBwb3dlcjModW5zaWduZWQgbG9uZyByZXN1bHRbXSk7CnZvaWQgcHJpbnRfcmVzdWx0KHVuc2lnbmVkIGxvbmcgcmVzdWx0W10pOwppbnQgbWFpbih2b2lkKQp7IHVuc2lnbmVkIGxvbmcgcmVzdWx0WzhdPXswfTsKICBwb3dlcjMocmVzdWx0KTsKICByZXR1cm4gMDsgfQogIAp2b2lkIHBvd2VyMyh1bnNpZ25lZCBsb25nIHJlc3VsdFtdKQp7IGZvcihpbnQgaT0xO2k8PTk5O2krKykKeyB1bnNpZ25lZCBsb25nIGE9MTsKICBmb3IoaW50IGo9MDtqPGk7aisrKSB7IGE9YSozOyB9CiAgZm9yKGludCBiPTA7Yjw4O2IrKykgeyByZXN1bHRbYl09MDt9CiAgZm9yKGludCBjPTA7Yzw4O2MrKykgeyByZXN1bHRbY109YSUxMDAwMDAwMDA7IGE9YS8wMTAwMDAwMDA7fQogIHByaW50X3Jlc3VsdChyZXN1bHQpOyB9IH0KICAKdm9pZCBwcmludF9yZXN1bHQodW5zaWduZWQgbG9uZyByZXN1bHRbXSkKeyBpbnQgdG9wX2xldmVsPTE7CiAgZm9yKGludCBpPTc7aT49MDtpLS0pIHsgaWYocmVzdWx0W2ldIT0wKSB0b3BfbGV2ZWw9MDsgfQogIGZvcihpbnQgZD0xO2Q8PTk5O2QrKykKICB7IGlmKHRvcF9sZXZlbD09MCkgCiAgeyBwcmludGYoIjNeJWQ9IixkKTsKICAgIGZvcihpbnQgaT03O2k+PTA7aS0tKQogIHsgaWYocmVzdWx0W2ldIT0wKSBwcmludGYoIiVsdSIscmVzdWx0W2ldKTsgfSB9CiAgICBwcmludGYoIlxuIik7IAogICAgYnJlYWs7IH0gfQ==