Chef wants to serve mankind by making people immortal by preparing a dish, a dish of life - a dish with the best taste in the universe, one with the smell and splash of fresh water flowing down the springs of the mountain, one with the smell of the best lily flowers of the garden, one that has contained the very essence of life in a real sense. 
This dish will contain K ingredients that are found only in remote islands amid mountains. For sake of convenience, we enumerate the ingredients by the integers from 1 to K, both inclusive. There are N islands and each of them offers some ingredients. Chef being a little child did not know how to collect the ingredients for the recipe. He went to all the islands and bought all the ingredients offered in each island. Could he possibly have saved some time by skipping some island? If it was not possible for Chef to collect the required ingredients (i.e. all the K ingredients), output "sad". If it was possible for him to skip some islands, output "some", otherwise output "all".

-----Input-----
First line of the input contains an integer T denoting number of test cases. The description of T test cases follow.
The first line of each test case contains two space separated integers N, K.
The i-th of the next lines will contain first an integer Pi, denoting the number of ingredients grown in the i-th island, followed by Pi distinct integers in the range [1, K]. All the integers are space separated. 

-----Output-----
For each test case, output a single line containing one of the strings "sad", "all" or "some" (without quotes) according to the situation. 

-----Constraints-----
- 1 ≤ T  ≤ 10
- 1 ≤ N, K ≤ 105
- 1 ≤ Pi ≤ K
- Sum of Pi over all test cases ≤ 106

-----Subtasks-----
Subtask #1 (30 points)
- 1 ≤ N, K ≤ 50

Subtask #2 (30 points)
- 1 ≤ K ≤ 50

Subtask #3 (40 points)
- original constraints

-----Example-----
Input
3
3 4
3 1 2 3
2 1 3
2 1 2
2 3
3 1 2 3
2 1 3
2 3
2 1 2
2 1 3

Output
sad
some
all

-----Explanation-----
Example 1. The ingredient 4 is not available in any island, so Chef can't make the dish of life. Hence, the answer is "sad".
Example 2. Chef can just go to the first island and collect all the three ingredients required. He does not need to visit the second island. So, the answer is "some".
Example 3. Chef has to visit both the islands in order to obtain all the three ingredients. So, the answer is "all".

```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

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "\n#island=[[0 for i in range(k+2)]for j in range(n)\nfor _ in range(int(input())):\n island=[]\n n,k=map(int,input().split())\n for i in range(n):\n  l=[int(i) for i in input().split()]\n  l=l[1:]\n  island.append(l)\n cnt=[0]*(k+1)\n for i in range(n):\n  for indigrient in island[i]:\n   cnt[indigrient]+=1 \n f=1 \n for i in range(1,k+1):\n  if cnt[i]==0:\n   f=0 \n   break \n if not f:\n  print('sad')\n  continue \n f1=0 \n # print(island)\n for i in range(n):\n  f2=1 \n  for j in island[i]:\n   if cnt[j]==1:\n    f2=0\n  if f2:\n   f1=1 \n   break \n if f1:\n  print('some')\n else:\n  print('all')"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13399