def ssum(l):
    return sum(list(map(int,list(str(l)))))

ans = [0]*10

for _ in range(10):
    l = input()
    num = ssum(l)
    while(num < 10):
        num = ssum(num)
    ans[num] += 1

_ans = []
mx = 0

for idx, v in enumerate(ans):
    if(v>=max):
        if(v>max):
            v.clear()
        _ans.apeend(idx)

for i in _ans:
    print(i, end=' ')
print('Hello world!')

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: