#B3911. Shot Put Cup Data Labeling Challenge
Shot Put Cup Data Labeling Challenge
Shot Put Cup Data Labeling Challenge
Blue-Edge Shot Put organizes the "Shot Put Cup" data labeling contest. In order to achieve the grand path to Au, LeAuingZ participates in the competition.
Blue-Edge Shot Put provides integer variables with names and values and asks LeAuingZ to label data for sentences. Each sentence consists of uppercase/lowercase letters, spaces, commas, periods, and the characters {
and }
. The text within {}
is one of the variable names. LeAuingZ needs to replace every occurrence of ({\texttt{variable_name}}) with its corresponding value.
For example, if and , then for the sentence "We know a is {a}, b is {b}." the output should be "We know a is 3, b is 4."
inputFormat
Input Format:
1. The first line contains two integers and , where is the number of variables and is the number of sentences.
2. The next lines each contain a variable name and an integer value, separated by a space.
3. The following lines each contain a sentence. The sentence may include letters, spaces, commas, periods, and braces. Placeholders appear in the form {variable_name} and should be replaced by the corresponding integer value.
outputFormat
Output Format:
Print lines. Each line is the sentence after all occurrences of the placeholder {variable_name} have been replaced by its corresponding value.
sample
2 1
a 3
b 4
We know a is {a}, b is {b}.
We know a is 3, b is 4.