Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings.



A subsequence is a sequence that can be derived from one sequence by deleting some characters without changing the order of the remaining elements. Trivially, any string is a subsequence of itself and an empty string is a subsequence of any string.



The input will be a list of strings, and the output needs to be the length of the longest uncommon subsequence. If the longest uncommon subsequence doesn't exist, return -1.


Example 1:

Input: "aba", "cdc", "eae"
Output: 3



Note:

All the given strings' lengths will not exceed 10.
The length of the given list will be in the range of [2, 50].

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

def _disabled_input(*args, **kwargs):
    raise RuntimeError("input() is disabled in callable mode")
builtins.input = _disabled_input

ns = {"__name__": "__judge__"}  # prevent if __name__ == "__main__" blocks
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'class Solution:\n     def findLUSlength(self, A):\n         """\n         :type A: List[str]\n         :rtype: int\n         """\n         \n         \n         \n         \n         """\n    #    a public CONCISE solution....\n    \n         def issubsequence(s, t):\n             t = iter(t)\n             return all(c in t for c in s)\n     \n         for s in sorted(strs, key=len, reverse=True):\n             if sum(issubsequence(s, t) for t in strs) == 1:\n                 return len(s)\n         return -1\n         """\n         \n         \n         \n         \n         \n         \n         \n         def subseq(w1, w2):\n             #True if word1 is a subsequence of word2.\n             i = 0\n             for c in w2:\n                 if i < len(w1) and w1[i] == c:\n                     i += 1\n             return i == len(w1)\n     \n         A.sort(key = len, reverse = True)\n         for i, word1 in enumerate(A):\n             if all(not subseq(word1, word2) \n                     for j, word2 in enumerate(A) if i != j):\n                 return len(word1)\n         return -1\n         \n     \n \n \n         """\n         When we add a letter Y to our candidate longest uncommon subsequence answer of X, \n         it only makes it strictly harder to find a common subsequence.\n         Thus our candidate longest uncommon subsequences will be chosen from the group of words itself.\n \n         Suppose we have some candidate X. \n         We only need to check whether X is not a subsequence of any of the other words Y. \n         To save some time, we could have quickly ruled out Y when len(Y) < len(X), \n         either by adding “if len(w1) > len(w2): return False” or enumerating over A[:i] (and checking neighbors for equality.) \n         However, the problem has such small input constraints that this is not required.\n \n         We want the max length of all candidates with the desired property, \n         so we check candidates in descending order of length. \n         When we find a suitable one, we know it must be the best nonlocal answer.\n         """\n         \n         \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'findLUSlength'
if _fn_name:
    if "Solution" in ns:
        try:
            _obj = ns["Solution"]()
            if hasattr(_obj, _fn_name):
                _target = getattr(_obj, _fn_name)
        except Exception:
            _target = None
    if _target is None and _fn_name in ns and callable(ns[_fn_name]):
        _target = ns[_fn_name]
# Fallback: if there's exactly one user-defined function, use it
if _target is None:
    _cands = [v for k, v in ns.items() if callable(v) and getattr(v, "__module__", "") in ("__judge__", "__main__")]
    _user_funcs = [c for c in _cands if getattr(c, "__name__", "").startswith("_") is False]
    if len(_user_funcs) == 1:
        _target = _user_funcs[0]
if _target is None:
    raise RuntimeError(f"Could not resolve callable '{_fn_name}'")

_raw = sys.stdin.read().strip()
if _raw:
    _parsed = json.loads(_raw)
    if isinstance(_parsed, dict):
        _kwargs = _parsed.get("kwargs", {})
        _args = _parsed.get("args", [])
    else:
        _args, _kwargs = _parsed, {}
else:
    _args, _kwargs = [], {}
if not isinstance(_args, (list, tuple)):
    _args = [_args]
_res = _target(*_args, **_kwargs)
try:
    sys.stdout.write(repr(_res) + "\n")
except Exception:
    pass

```

Measured memory_bytes: 6610