
import java.util.*;

public class SecondScannerExercise
{
    public static void main(String[] args)
    {
        Scanner keyboard = new Scanner(System.in);

        String word1, word2, word3;

        System.out.println( "Enter a line of text with three words:");
        word1 = keyboard.next( );
        word2 = keyboard.next( );
        word3 = keyboard.next( );

        System.out.println( "With space corrected, you entered:");
        System.out.println(word1 + "  " + word2 + "  " + word3);
    }
}
