Creating words by structure Context

As a conlanger, I am interested in creating a uniform, naturalistic language. One of the tricks is to create vocabulary according to certain structures of words. An example from English: In English, we have the word “tap” structured consonant-vowel-consonant. Usually, this means that there are many other words of this structure: “cat”, “dog”, “rock”, “fog”, “good”, etc.

Task

As input, you have:


an array C containing strings: consonants (C is the first letter in the word consonants). Identical consonants cannot be repeated on this list. For example, this list cannot contain ['b', 'b'].
an array V containing strings: vowels (V is the first letter of the word vowels).  Identical vowels cannot be repeated on this list.
string S, which contains something like this "CVCCV" (any combination of "C" and "V")


Your task is to replace “C” in the string with a randomly taken string from array C and replace “V” in the string with a randomly taken string from array V and return (or display) this string.

"randomly" is defined as all possibilities having an equal chance of being selected. This is a kind of simplification: in real languages as well as in conlangs, ​​there are very frequent (for example 'r' in English) and not very frequent sounds but this is just a code-golf.

Rules

This is code-golf so the lowest byte count wins.

Examples

Input:
C = ['p', 'b', 't', 'd', 'k', 'g', 'm', 'n', 'w']
V = ['a', 'o', 'u', 'i', 'e', 'ä']
S = 'CVCCV'

Output:
pakto


Input:
C = ['p', 'b', 't', 'd', 'k', 'g', 'v', 's', 'r']
V = ['a', 'o', 'u', 'i', 'e', 'ä', 'ᵫ']
S = 'CVVCCVCCV'

Output:
koebrᵫvtä
05AB1E, 4 bytes

Takes input as S, [V,C]

Çè€Ω


Try it online!