Zoho interview question

Find the longest matching string with given three sentences.