#include <stdio.h>
#include <string.h>

int main() {
	const char numeric_label[][4] = {"", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구", "십"}, subunit_label[][4] = {"", "십", "백", "천"}, unit_label[][4] = {"", "만", "억", "조", "경", "해", "자", "양", "구", "간", "정", "재", "극"};
	char money[100] = "", *money_ptr = money;
	scanf("%s", money);
	
	size_t money_len = strlen(money);
	if(money_len == 1 && *money_ptr == '0') printf("영"); else
	while(*money_ptr) printf("%s%s ", (char *)numeric_label + (*money_ptr++ - 0x30 << 2), (--money_len & 3) ? (char *)subunit_label + ((money_len & 3) << 2) : (char *)unit_label + (money_len & -4));
	putchar('\n');

	return 0;
}