Motive interview question

Generate all the possible IP addresses from a given string.