#38910: EZEZEZ


115205@tchcvs.tw (114級115205資2班.張楷昊)


a=input()
b=input().split(a)
for i in b:
    print(i)