import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.util.Arrays;
import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        String s = "";
        while (!reader.hasNext("end")){
            s = reader.nextLine();
        }
        String[] sn = s.split("\\s+");
        for (String item:sn) {
            System.out.println(item);
        }
        System.out.println(Arrays.toString(sn));
    }
}
