#!/usr/bin/env python3

# Import Required Libraries
import sys
import json
import csv

# Read the Header
header = next(sys.stdin).strip().split(',')
header = [h.strip() for h in header]

# Process Each Line
for line in sys.stdin:

    line = line.strip()

    # Skip Empty Lines
    if not line:
        continue

    # Read CSV Values
    try:
        reader = csv.reader([line])
        values = next(reader)

    except Exception:
        continue

    # Create JSON Document
    document = {}

    for i, field in enumerate(header):

        try:
            # Convert Numeric Fields
            if field in ['quantity', 'price']:
                document[field] = float(values[i])

            else:
                document[field] = values[i]

        except (ValueError, IndexError):
            continue

    # Convert Document into JSON
    print(f"null\t{json.dumps(document)}")