import java.util.Scanner; /** * Replace this JavaDoc comment for the purpose of this class */ public class Solution { /** * Gets data from standard input */ private Scanner input = null; /** * Start the execution of the solution * @param args Command line arguments */ public static void main(String args[]) { Solution solution = new Solution(); solution.run(); } /** * Run the solution. This method is called from main() */ public void run() { // Create object to read data from standard input this.input = new Scanner(System.in); List students = new List(); // This code replicates the input to the standard output // Modify this code to solve the problem while ( this.input.hasNextLine() ) { String name = this.input.nextLine().trim(); if ( name.length() > 0 ) { students.append( name ); } } students.print( System.out ); // Close the standard input this.input.close(); } }