A notification service renders message templates containing placeholders of
the form {{name}} (no spaces inside the braces; names are word characters).
Replace every placeholder that has a defined variable with its value; leave
UNDEFINED placeholders exactly as they are. Variable values never contain
braces. A variable may be used any number of times.
Input Format:
Line 1: k (number of variables)
Lines 2 to k+1: "<name> <value>" — split on the FIRST space only; the
value may contain spaces
Remaining lines: the template (may span multiple lines)
Output Format:
The rendered template, preserving its line structure.