Given a string consisting of only lowercase English alphabets, your task is to find the smallest palindromic substring.
In case there are multiple palindromic substrings of the same length present, print the lexicographically smallest substring. 
Formally, a substring is a contiguous sequence of characters within a string. So in a string "abcdef", "abc" is a substring whereas "adf" is not a substring.
A palindrome is a word, phrase, or sequence that reads the same backwards as forwards, e.g. madam or mom.

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains of two lines of input, two integers.
- First, we have a single integer $N$ which signifies the length of the substring.
- Next, we have a string of length $N$ that only has lowercase English alphabets.

-----Output:-----
For each testcase, output in a single line the shortest palindromic substring.

-----Constraints-----
- $1 \leq T \leq 100$
- $2 \leq N \leq 10^5$

-----Sample Input:-----
2
2
zy
1
cd

-----Sample Output:-----
y
c

-----EXPLANATION:-----
There are only two possibilities. "z" and "y". Since both of them have the same length. We print the lexicographically smaller substring which is y.

```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 = '# cook your dish here\ndef palindromeSubStrs(s):\n m = dict()\n n = len(s)\n\n R = [[0 for x in range(n + 1)] for x in range(2)]\n\n s = "@" + s + "#"\n\n for j in range(2):\n  rp = 0\n  R[j][0] = 0\n\n  i = 1\n  while i <= n:\n\n   while s[i - rp - 1] == s[i + j + rp]:\n    rp += 1\n   R[j][i] = rp\n   k = 1\n   while (R[j][i - k] != rp - k) and (k < rp):\n    R[j][i + k] = min(R[j][i - k], rp - k)\n    k += 1\n   rp = max(rp - k, 0)\n   i += k\n s = s[1:len(s) - 1]\n m[s[0]] = 1\n for i in range(1, n):\n  for j in range(2):\n   for rp in range(R[j][i], 0, -1):\n    m[s[i - rp - 1: i - rp - 1 + 2 * rp + j]] = 1\n  m[s[i]] = 1\n ans=[]\n for i in m:\n  ans.append(i)\n print(min(ans))\n\nfor i in range(int(input())):\n n=int(input())\n s=input()\n palindromeSubStrs(s)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13023