#!/usr/bin/env python3

import os
import sys

for line in sys.stdin:
  d = line.strip()
  if len(d) == 0: continue
  announced = False
  with open(d+'/result') as f:
    for fline in f:
      if not announced:
        print(d+':')
        announced = True
      sys.stdout.write('  '+fline)
