EOF
까지 입력받는 걸 신경쓰는 게 더 어려운 문제.
import sys
trees = {}
total = 0
while True:
tree = sys.stdin.readline().rstrip()
if not tree: break
tree_cnt = trees.get(tree, 0)
tree_cnt += 1
total += 1
trees[tree] = tree_cnt
for tree, tree_cnt in sorted(trees.items()):
num = tree_cnt/total*100
print(f"{tree} {num:.4f}")