def encodeWord(word: str, isNormalVersionForLogicallyThinkingHuman: bool) -> str:
    """Encode single word into its numerical representation in given system (e.g. "koko" -> "3131")"""

    map1 = {1:['w', 'e', 'r', 'u', 'i', 'o', 'a', 's', 'z', 'x', 'c', 'v', 'n', 'm', 'ę', 'ó', 'ą', 'ś', 'ń', 'ć', 'ż', 'ź'],
    2: ['p', 'y', 'j', 'g', 'q'],
    3: ['t', 'l', 'b', 'd', 'h', 'k', 'ł'],
    4: ["f"]}

    map2 = {1:["a", "c", "e", "m", "n", "o", "r", "s", "u", "w", "z", "x", "v"],
    2: ["ą", "ę", "g", "j", "p", "y", "q"],
    3: ["b", "ć", "d", "h", "k", "l", "ł", "ń", "ó", "ś", "t", "ź", "ż", "i"],
    4: ["f"]}

    selectedVersionMap = map2 if isNormalVersionForLogicallyThinkingHuman else map1
    numbered = ''
    for char in word:
        for key in selectedVersionMap.keys():
            if char in selectedVersionMap[key]:
                numbered = numbered + str(key)
                break
    return numbered