def solution(s): return s[(l - 1) // 2] if (l := len(s)) % 2 == 1 else s[l//2 - 1 : l//2 + 1] print(solution("hello")) print(solution("abcde")) print(solution("qwer"))