Accounts Merge

Implement solve for Accounts Merge. Return the required output for the provided arguments.

Examples
Input: [["John","johnsmith@mail.com","john_newyork@mail.com"],["John","johnsmith@mail.com","john00@mail.com"],["Mary","mary@mail.com"],["John","johnnybravo@mail.com"]]
Output: [["John","john00@mail.com","john_newyork@mail.com","johnsmith@mail.com"],["Mary","mary@mail.com"],["John","johnnybravo@mail.com"]]
Hints

Accounts Merge

Implement `solve` for **Accounts Merge**. Return the required output for the provided arguments.