There are n rooms (0 to n-1). Room 0 is unlocked. Each room has a set of keys to other rooms. Return true if you can visit all rooms.
Example 1:
Input: 4 1 2 3 (empty) Output: true
Input format: Line 1: n. Next n lines: space-separated keys in that room (or empty line).
Output format: true or false.