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