1class Solution:2def originalDigits(self, s: str) -> str:3c = dict()45c[0] = s.count("z")6c[2] = s.count("w")7c[4] = s.count("u")8c[6] = s.count("x")9c[8] = s.count("g")1011c[3] = s.count("h") - c[8]12c[5] = s.count("f") - c[4]13c[7] = s.count("s") - c[6]1415c[9] = s.count("i") - (c[8] + c[5] + c[6])16c[1] = s.count("o") - (c[0] + c[2] + c[4])1718c = sorted(c.items(), key=lambda x: x[0])19ans = ""20for k, v in c:21ans += str(k) * v22return ans