#!/usr/bin/python3 # # A program that reads a list of words from the standard input, with # one word per line, and prints any one of the shortest words that # appear least often. # import sys D = {} for w in sys.stdin: w = w.strip() if w in D: D[w] += 1 else: D[w] = 1 min_v = None min_len_w = None for k,v in D.items(): if min_v == None: min_v = v min_len_w = k elif v < min_v: min_v = v min_len_w = k elif v == min_v and len(k) < len(min_len_w): min_len_w = k print(min_len_w)