Trie insert, search만 조금 변형하면 된다. import sys input = sys.stdin.readline from collections import defaultdict class Node: def __init__(self): self.word = False self.children = {} class Trie: def __init__(self): self.root = Node() def insert(self, word): node = self.root for char in word: if char not in node.children: node.children[char] = Node() node = node.children[char] same_nick[word] += 1 node...