The syllabic structure of the Persian language is CV(C)(C). C stands for Consonants and V stands for Vowels. The CV(C)(C) means that there are three types of syllables in Persian:
Write a function that takes the phonetic transcription of a Persian word as an argument and returns the syllabified word based on the syllabic structure. In other words, put a period between syllables.
syllabification("kAr") ➞ "kAr"
syllabification("bArAn") ➞ "bA.rAn"
syllabification("tA") ➞ "tA"
syllabification("deraxt") ➞ "de.raxt"
syllabification("pust") ➞ "pust"
syllabification("lAjevard") ➞ "lA.je.vard"
a, A, e, i, o, up, b, t, d, k, g, G, ?, f, v, s, z, S, Z, x, h, c, j, m, n, r, l, ySince each syllable has only one vowel, it's not necessary to know the consonants. Just knowing that there is only one consonant before the vowel and 0 to 2 consonants after the vowel is enough to solve the challenge.