#38. 键值对字符串处理与合并

键值对字符串处理与合并

Key-Value Merge

Background

Dawei is processing some data stored as key-value pairs in a map. He needs to perform some specific operations on these maps.

Problem Description

Modify and return the given map as follows: for this problem, the map may or may not contain the "a" and "b" keys. If both keys are present, append their two string values together and store the result under the key "ab".

Input Format

Input is given from Standard Input in the following format.

A string containing zero or more space-separated key-value pairs, each in the format "key": "value".

Output Format

Output is printed to Standard Output in the following format.

The modified map, represented as a JSON string.

Sample

"a": "Hi" "b": "There"
{"a": "Hi\