local input = io.read('*a')
local n_pos = string.find(input, "\n")
local string_o = string.upper(string.sub(input, 1, n_pos - 1))
local string_t = string.upper(string.sub(input, n_pos + 1, #input - 1))
local detected_map = {}
local type_index = 1
local result = ""
for i = 1, #string_o do
if string.sub(string_o, i, i) == string.sub(string_t, type_index, type_index) then
type_index = type_index + 1
else
if not detected_map[string.sub(string_o, i, i)] then
detected_map[string.sub(string_o, i, i)] = true
result = result .. string.sub(string_o, i, i)
end
end
end
print(result)
08-08
879