#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
void pt(int a)
{char word[19][5]={"零","壹","貳","參","肆","伍","陸","柒","捌","玖"} ;
if(a/1000>0){
printf("%s仟",word[a/1000]);
}
if(a/100>0){
printf("%s佰",word[a/100]);
}
if(a/10>0){
printf("%s拾",word[a/10]);
}
if(a>0){
printf("%s",word[a]);
}
}
int main(int argc, char *argv[]) {
int b,c=0;
while(c!=1)
{ scanf("%d",&b);
if(b>=0&&b<=2147483647) {
if(b/100000000>0)
{pt(b/100000000>0);
printf("億");
}
if(b/10000>0){
pt(b/10000);
printf("萬");
}
if (b/10000>0 && b/1000%10==0 && b%1000>0){
printf("零");
}
pt(b%10000);
if(b==0){
printf("零");
}
printf("\n");
}
else
c=c+1;
}
return 0;
}