Approach hintTry it first, then revealHide
Each number has only 45 substrings. Count how many different contacts contain each substring, storing the last owner on every trie node to avoid double counting, then choose each contact's shortest substring with count 1.