Petya loves hockey very much. One day, as he was watching a hockey match, he fell asleep. Petya dreamt of being appointed to change a hockey team's name. Thus, Petya was given the original team name *w* and the collection of forbidden substrings *s*<sub class="lower-index">1</sub>, *s*<sub class="lower-index">2</sub>, ..., *s*<sub class="lower-index">*n*</sub>. All those strings consist of uppercase and lowercase Latin letters. String *w* has the length of |*w*|, its characters are numbered from 1 to |*w*|.

First Petya should find all the occurrences of forbidden substrings in the *w* string. During the search of substrings the case of letter shouldn't be taken into consideration. That is, strings "aBC" and "ABc" are considered equal.

After that Petya should perform the replacement of all letters covered by the occurrences. More formally: a letter in the position *i* should be replaced by any other one if for position *i* in string *w* there exist pair of indices *l*, *r* (1 ≤ *l* ≤ *i* ≤ *r* ≤ |*w*|) such that substring *w*[*l* ... *r*] is contained in the collection *s*<sub class="lower-index">1</sub>, *s*<sub class="lower-index">2</sub>, ..., *s*<sub class="lower-index">*n*</sub>, when using case insensitive comparison. During the replacement the letter's case should remain the same. Petya is not allowed to replace the letters that aren't covered by any forbidden substring.

Letter *letter* (uppercase or lowercase) is considered lucky for the hockey players. That's why Petya should perform the changes so that the *letter* occurred in the resulting string as many times as possible. Help Petya to find such resulting string. If there are several such strings, find the one that comes first lexicographically.

Note that the process of replacements is not repeated, it occurs only once. That is, if after Petya's replacements the string started to contain new occurrences of bad substrings, Petya pays no attention to them.
The first line contains the only integer *n* (1 ≤ *n* ≤ 100) — the number of forbidden substrings in the collection. Next *n* lines contain these substrings. The next line contains string *w*. All those *n* + 1 lines are non-empty strings consisting of uppercase and lowercase Latin letters whose length does not exceed 100. The last line contains a lowercase letter *letter*.
none
3
bers
ucky
elu
PetrLoveLuckyNumbers
t
PetrLovtTttttNumtttt
4
hello
party
abefglghjdhfgj
IVan
petrsmatchwin
a
petrsmatchwin
2
aCa
cba
abAcaba
c
abCacba
3
lol
hello
eho
PetrUnited
t
PetrUnited
2
trsd
dream
PetrsDreamOh
y
PeyyyYyyyyOh
1
PetrsDreamOh
PetrsDreamOh
h
HhhhhH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acCorldWarIItesthardshixper
3
jap
thd
dshipssinceW
JapanisexperiencingitsgreatesthardshipssinceWorldWarIIthardshipssinceWorldWarIItesthardshixper
a
AbaanisexperiencingitsgreatestharaaaaaaaaaaaAorldWarIItharaaaaaaaaaaaAorldWarIItesthardshixper
7
a
h
u
p
fgh
wyz
defghijkl
abcdefghijklmnopqrstuvwxyz
a
bbcaaaaaaaaamnoaqrstavwxyz
9
a
h
u
p
z
fgh
wyz
defghijkl
ghijklmnopqrstu
abcdefghijklmnopqrstuvwxyz
a
bbcaaaaaaaaaaaaaaaaaavwxya
3
ab
Ba
aB
ABBA
l
LLLL
pya = int(input())
arre = []

while pya:
    pya -= 1
    arre.append(input().lower())

oString = input()
lowString = oString.lower()

letter1 = input()[0].lower()
letter2 = 'a' if letter1.lower() else 'b'

valid = [0 for i in range(len(oString))]

setcito = set()

for x in arre:
    if lowString.find(x):
        wat = 0
        while True:
            index = lowString.find(x, wat)
            if index < 0:
                break
            for i in range(index, index + len(x)):
                setcito.add(i)
            wat = index + len(x)

oString = list(oString)
for i in setcito:
    letter = letter1 if lowString[i] != letter1 else letter2
    oString[i] = letter if oString[i].islower() else letter.upper()

for x in oString:
    print(x, end="")
print()

"""
3
e
e
e
PetrLoveLuckyNumbersee
t

"""
