Depth First Search and Backtrack to Restore IP Address