a = input()
ls = a.split(",")
for i in ls:
    if ":" in i:
        pairNum = 0
        for c in i:
            if c == ":":
                pairNum += 1
        if pairNum == 1:
            print("ok")
        else:
            print(i)
    else:
        print(i)
print("{} item".format(len(ls)))

Embed on website

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