Motive Interview Question

Generate all the possible IP addresses from a given string.