function abc (str, list) isempty(str) && return true for i = 1:length(list) str[end] in list[i] && any([abc(str[1:end-1], deleteat!(copy(list), i))]) && return true end false end