WikiTree has a help page for Welsh names in the medieval period before the English required the adoption of surnames: Name_Fields_Welsh_Aristocrats.
Patronymics can go on forever -- "Jack the son of John the son of George the son of Henry the son of Mabel the daughter of Henry" and sometimes you'll see that in order to distinguish one person from another.
But we only put the parental generation in the LNAB.
In Welsh "the son of" is "ap" (or "ab" if before a name starting with a vowel sound) and "the daughter of" is "ferch". I understand the Welsh "f" sounds like a "v" in English so when an English scribe was doing the writing it was often written as "verch"
So you might see a text somewhere talking about Iorwerth ap Madog ap Rhirid ap Cynwyn. For the WikiTree data field, enter Iorwerth as the first name, and "ap Madog" as the LNAB. The rest should be discussed in the biography.