import json
import sys
from collections import MutableMapping, MutableSequence

def strip_whitespace(json_data):
    if isinstance(json_data, MutableMapping): # json object
        it = json_data.items()
    elif isinstance(json_data, MutableSequence): # json array
        it = enumerate(json_data)
    else: # scalar data
        return # do nothing

    for k, v in it:
        if hasattr(v, 'strip'): # json string
            json_data[k] = v.strip()
        else:
            strip_whitespace(v) # recursive call


data = json.load(sys.stdin) # read json from stdin
strip_whitespace(data)
json.dump(data, sys.stdout, indent=2)