Mad-Libs
Statement
Goal
You must insert the given words into the given statement to form a finished Mad-Libs.Input
First Line: Statement with '_' character wherever a word needs to go
Second Line: Number of words n
Next n Lines: Each word
Second Line: Number of words n
Next n Lines: Each word
Output
Print the complete statement formed by inserting the words
Constraints
All words are in order
No words contain '_'
0 < n <= 10
The number of '_'s in the statement equals n
Starting and final statement length <= 255 characters
Each word <= 10 characters
No words contain '_'
0 < n <= 10
The number of '_'s in the statement equals n
Starting and final statement length <= 255 characters
Each word <= 10 characters
Example
Input
The _ dog barked. 1 brown
Output
The brown dog barked.
Game modes
Fastest, Shortest, Reverse
Test cases
Single Word Test
Input
The _ dog barked.
1
brown
Output
The brown dog barked.
Validator 1 Validator
Input
The _ car honked.
1
yellow
Output
The yellow car honked.
Two words Test
Input
The _ put on his red _.
2
clown
nose
Output
The clown put on his red nose.
Validator 2 Validator
Input
The _ _ over the fence.
2
dog
jumped
Output
The dog jumped over the fence.
Many Words Test
Input
The _ _ sped down the _ in their bright _ car.
4
crazy
driver
highway
red
Output
The crazy driver sped down the highway in their bright red car.
Validator 3 Validator
Input
The _ _ sped down the _ in their _ yellow _.
5
excited
driver
road
bright
taxi
Output
The excited driver sped down the road in their bright yellow taxi.
Uppercase Words Test
Input
_ loved to juggle. _ spent _ practicing.
3
Fred
He
hours
Output
Fred loved to juggle. He spent hours practicing.
Validator 4 Validator
Input
_ loves to sing, so _ started a _.
3
Mary
she
band
Output
Mary loves to sing, so she started a band.
Solution language
Solution
Stub generator input