while 1:a=input().split(',',8)*9;a[71:]and print(a[67]+','+a[60])