#!/usr/bin/python2.4

import sys

def istype(s):
  types = ['personal','work','other', 'home', 'mobile']
  if s.lower() in types:
    return True
  return False

def getline(f):
  result_ar = []
  tmp_result = []
  inquotes = False
  while True:
    line = f.readline()
    if not line:
      break
    line = line.replace('\l','').replace('\b','').replace('\r','')
    x = 0
    for c in line:
      if c == '"':
        inquotes = not inquotes
        if inquotes and x != 0 and line[x-1] == '"':
          tmp_result.append(c)
      elif c == ',' or c=='\n' and not inquotes:
        result_ar.append(''.join(tmp_result))
        tmp_result = []
      else:
        tmp_result.append(c)
      x = x+1
    if not inquotes:
      break
  return result_ar

f = sys.stdin
while True:
  line = [x.replace('\n','/') for x in getline(f)]
  if not line:
    break
  print '%s:' % line[0]
  for field in line[1:]:
    if field:
      if istype(field):
        print '  %s:' % field
      else:
        print '    ', field
  print
