Added while true loop to read multiple lines of input