Pyth, 21 20 bytes
AQVcH)IqG:NZlG:NlGlN
-1 by using V
instead of FN
because V
implicitly sets N
-0 Changed 0
to Z
simply because it looks cooler having no numbers in the code
I'm sure this could use some serious golfing but as a Pyth beginner, just getting it to work was a bonus.
How does it work?
Basically a port of my IBM/Lotus Notes and Python answers...
AQ #Take the input and assign the two parts to variables G and H
VcH) #For variable N in H.(split on spaces)
IqG:N0lG #If G = the first part of N...
:NlGlN #Then implicitly print the remainder of N