Find the longest sequence of prefix

Find the longest sequence of prefix shared by all the words in a string.
"abcdef abcdxxx abcdabcdef abcyy" => "abc"