import java.io.*;
import java.util.*;

public class Main {

    /**
     * @param args
     * @throws FileNotFoundException 
     * @throws FileNotFoundException 
     * @throws FileNotFoundException when the file cannot be loaded 
     */

    public static void main(String[] args) throws IOException{

        String hteam = "";
        String ateam = "";
        int hscore = 0;
        int ascore = 0;

        Scanner s = new Scanner(System.in).useDelimiter("\\s*:\\s*|\\n");
        // create a scanner which scans from a file and splits at each colon

        while ( s.hasNext() ) {

            hteam = s.next();       // read the home team from the file
            ateam = s.next();       // read the away team from the file
            hscore = s.nextInt();       //read the home team score from the file
            ascore = s.nextInt();       //read the away team score from the file
        
            System.out.print(hteam);    // output the line of text to the console
            System.out.print(hscore);
            System.out.print(ateam);
            System.out.println(ascore);
        }
        System.out.println("\nEOF");    // Output and End Of File message.
    }
}