/**
 * Created by IntelliJ IDEA.
 * User: m09baa2
 * Date: 21.10.2009
 * Time: 17:21:31
 * To change this template use File | Settings | File Templates.
 */
import java.io.*;
import java.util.*;
public class Search {
    public static void main ( String[]args)throws Exception{
        Scanner s = new Scanner (new File("search.in"));
        PrintWriter p= new PrintWriter (new File("search.out"));

        String a= s.nextLine() + " ";
        int n = a.length();
        int begin=0;
        int end = 0;
        for (int i=0; i<n; i++)
        {
            end++;
            char sim=a.charAt(i);
            if (sim == ' '){
                //System.out.println(begin + " " + end + " " + a.substring(begin,end));
                p.println(a.substring(begin,end));
                begin = i + 1;
            }
        }
        p.close();
        s.close();


    }
}
