# -*- coding:utf-8 -*-
a = eval(input())
s = []
for i in a:
    if i[:3] == "PSH":
        s.append(i[3:])

print(",".join(s))