Z18736

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z18736"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z18733",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "def Z18733(Z18733K1):\n    # define the units and twenties place\n    ones = [\"\", \"bat\", \"bi\", \"hiru\", \"lau\", \"bost\", \"sei\", \"zazpi\", \"zortzi\", \"bederatzi\", \"hamar\", \"hamaika\", \"hamabi\", \"hamahiru\", \"hamalau\", \"hamabost\", \"hamasei\", \"hamazazpi\", \"hamazortzi\", \"hemeretzi\"]\n    twenties = [\"\", \"hogei\", \"berrogei\", \"hirurogei\", \"laurogei\"]\n    hundreds = [\"\", \"ehun\", \"berrehun\", \"hirurehun\", \"laurehun\", \"bostehun\", \"seiehun\", \"zazpiehun\", \"zortziehun\", \"bederatziehun\"]\n    units = [(\"kuaturdezilioi\", 1_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000),(\"tredezilioi\", 1_000_000_000_000_000_000_000_000_000_000_000_000_000_000),(\"duodezilioi\", 1_000_000_000_000_000_000_000_000_000_000_000_000_000),(\"undezilioi\", 1_000_000_000_000_000_000_000_000_000_000_000_000),(\"dezilioi\", 1_000_000_000_000_000_000_000_000_000_000_000),(\"nonilioi\", 1_000_000_000_000_000_000_000_000_000_000),(\"oktilioi\", 1_000_000_000_000_000_000_000_000_000),(\"septilioi\", 1_000_000_000_000_000_000_000_000),(\"sextilioi\", 1_000_000_000_000_000_000_000),(\"kintilioi\", 1_000_000_000_000_000_000), (\"kuadrilioi\", 1_000_000_000_000_000), (\"trilioi\", 1_000_000_000_000), (\"bilioi\", 1_000_000_000), (\"milioi\", 1_000_000), (\"mila\", 1_000), (\"ehun\", 100), (\"\", 1)]\n\n    # function to convert numbers less than 1000 to words\n    def words(Z18733K1):\n        if Z18733K1 == 0:\n            return \"\"\n        elif Z18733K1 \u003C= 19:\n            return ones[Z18733K1]\n        elif Z18733K1 \u003C= 99:\n            twenties_unit = twenties[Z18733K1 // 20]\n            ones_unit = ones[Z18733K1 % 20]\n            return twenties_unit + \"ta \" + ones_unit if ones_unit else twenties_unit\n        else:\n            return hundreds[Z18733K1 // 100] + \" eta \" + words(Z18733K1 % 100) if Z18733K1 % 100 else hundreds[Z18733K1 // 100]\n\n    # convert numbers to words\n    result = \"\"\n    if Z18733K1 \u003C 0:\n        Z18733K1 = abs(Z18733K1)\n        result = \"minus\"\n    if Z18733K1 == 0:\n        result = \"zero\"\n    else:\n        for unit_name, factor in units:\n            count, Z18733K1 = divmod(Z18733K1, factor)\n            if count \u003E 999:\n                #ERROR: number is too large for this algorithm\n                result = \"ERROREA: zenbakia handiegia da algoritmo honetarako\"\n            if count \u003E 0:\n                if factor == 1000:\n                    result = result + \" \" + words(count) + \" \" + unit_name if count != 1 else result + \" \" + unit_name\n                elif factor == 100:\n                    if (Z18733K1 % factor):\n                        result = result  + \" \" + hundreds[count]\n                    else:\n                        result = result + \" eta \" + hundreds[count]\n                elif factor == 1:\n                    result = result + \" eta \" + words(count) + unit_name\n                else:\n                    result = result + \" \" + words(count) + \" \" + unit_name if count != 1 else result + \" \" + unit_name + \" bat\"\n        if (result.startswith(\" eta \")): result = result[5:]\n        elif (result.startswith(\"minus eta \")): result = result.replace(\"minus eta \",\"minus \")\n    return result.strip()"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Basque Cardinal Python"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}