#era-
a=[]
l=[['insert', 'AAA'], ['insert', 'AAC'], ['find', 'AAA'], ['find', 'CCC'], ['insert', 'CCC'], ['find', 'CCC']]
for i in l:
if i[0]=='insert':
a.append(i[1])
elif i[0]=='find':
if a in i[1]:
print('YES')
else:
print('NO')
else:
pass
I2VyYS0KCmE9W10KbD1bWydpbnNlcnQnLCAnQUFBJ10sIFsnaW5zZXJ0JywgJ0FBQyddLCBbJ2ZpbmQnLCAnQUFBJ10sIFsnZmluZCcsICdDQ0MnXSwgWydpbnNlcnQnLCAnQ0NDJ10sIFsnZmluZCcsICdDQ0MnXV0KCmZvciBpIGluIGw6CglpZiBpWzBdPT0naW5zZXJ0JzoKCQlhLmFwcGVuZChpWzFdKQoJZWxpZiBpWzBdPT0nZmluZCc6CgkJaWYgYSBpbiBpWzFdOgoJCQlwcmludCgnWUVTJykKCQllbHNlOgoJCQlwcmludCgnTk8nKQoJZWxzZToKCQlwYXNz