Problem Description

Line1 is JSON object. Line2 has integer q. Next q lines are paths like a.b[0].c. If any path missing, collect them and print MISSING count and list. Else print OK.

Input Format

Line1: JSON object. Line2: q. Next q lines: path.

Output Format

One line output.

Sample Test Case

Input:
{\"a\":{\"b\":[{\"c\":5}]}} 3 a.b[0].c a.x z
Output:
MISSING 2 a.x z

Constraints

Total nodes+path length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next