AdvancedRating 1600
Restore IP Addresses
Insert three dots into the digit string to make valid IPv4 addresses (four numbers 0–255, no leading zeros). Print all of them in alphabetical order, or NONE.
Input
One string of digits.
Output
Lines.
Sample 1
Input
25525511135
Output
255.255.11.135 255.255.111.35
Sample 2
Input
0000
Output
0.0.0.0
Output appears here