The internet is a very confounding place for some adults. Tom has just joined an online forum and is trying to fit in with all the teens and tweens. It seems like they're speaking in another language! Help Tom fit in by translating his well-formatted English into n00b language.

The following rules should be observed:

- "to" and "too" should be replaced by the number 2, even if they are only part of a word (E.g. today = 2day)
- Likewise, "for" and "fore" should be replaced by the number 4
- Any remaining double o's should be replaced with zeros (E.g. noob = n00b)
- "be", "are", "you", "please", "people", "really", "have", and "know" should be changed to "b", "r", "u", "plz", "ppl", "rly", "haz", and "no" respectively (even if they are only part of the word)
- When replacing words, always maintain case of the first letter unless another rule forces the word to all caps.
- The letter "s" should always be replaced by a "z", maintaining case
- "LOL" must be added to the beginning of any input string starting with a "w" or "W"
- "OMG" must be added to the beginning (after LOL, if applicable,) of a string 32 characters^(1) or longer
- All evenly numbered words^(2) must be in ALL CAPS (Example: ```Cake is very delicious.``` becomes ```Cake IZ very DELICIOUZ```)
- If the input string starts with "h" or "H", the entire output string should be in ALL CAPS
- Periods ( . ), commas ( , ), and apostrophes ( ' ) are to be removed
- ^(3)A question mark ( ? ) should have more question marks added to it, equal to the number of words^(2) in the sentence (Example: ```Are you a foo?``` has 4 words, so it would be converted to ```r U a F00????```)
- ^(3)Similarly, exclamation points ( ! ) should be replaced by a series of alternating exclamation points and the number 1, equal to the number of words^(2) in the sentence (Example: ```You are a foo!``` becomes ```u R a F00!1!1```)

^(1) Characters should be counted After: any word conversions, adding additional words, and removing punctuation. Excluding: All punctuation and any 1's added after exclamation marks ( ! ). Character count includes spaces.

^(2) For the sake of this kata, "words" are simply a space-delimited substring, regardless of its characters. Since the output may have a different number of words than the input, words should be counted based on the output string.

Example: ```whoa, you are my 123 <3``` becomes ```LOL WHOA u R my 123 <3``` = 7 words

^(3)The incoming string will be punctuated properly, so punctuation does not need to be validated.

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

def _disabled_input(*args, **kwargs):
    raise RuntimeError("input() is disabled in callable mode")
builtins.input = _disabled_input

ns = {"__name__": "__judge__"}  # prevent if __name__ == "__main__" blocks
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'def remove_punc(words):\n    if "\'" in words:\n        temp_2 = words.partition("\'")\n        words = temp_2[0] + temp_2[-1]  \n        \n        words = remove_punc(words)\n        \n    if "." in words:\n        temp_2 = words.partition(".")\n        words = temp_2[0] + temp_2[-1]  \n        \n        words = remove_punc(words)\n        \n    if "," in words:\n        temp_2 = words.partition(",")\n        words = temp_2[0] + temp_2[-1]\n        \n        words = remove_punc(words)\n\n    return words\n    \ndef transw(words, old, new):\n    temp_words = words.lower().replace(old, " "*len(old))\n    result = ""\n    threshold = 0\n    for i in range(0, len(temp_words)):\n        if temp_words[i] != " ":\n            result = result + words[i]\n        else:\n            threshold += 1\n            if threshold == len(old):           \n                result = result + new\n                threshold = 0\n    return result\n    \n\n\ndef n00bify(text):\n    temp = text.split()\n    result = ""\n    for i in temp:\n        \n        i = transw(i, \'too\', \'2\')\n        i = transw(i, \'to\', \'2\')\n        i = transw(i, \'fore\',\'4\')\n        i = transw(i, \'for\', \'4\')\n        i = transw(i, \'oo\', \'00\')\n        i = transw(i, \'be\', \'b\')\n        i = transw(i, \'you\', \'u\')\n        i = transw(i, \'are\', \'r\')\n        i = transw(i, \'please\', \'plz\')\n        i = transw(i, \'people\', \'ppl\')\n        i = transw(i, \'really\', \'rly\')\n        i = transw(i, \'have\', \'haz\')\n        i = transw(i, \'know\', \'no\')\n        i = transw(i, \'s\', \'z\')\n            \n        i = remove_punc(i)\n        \n        if len(result) == 0:\n            result = result + i\n        else:\n            result = result + " " + i\n    \n    if result[0] == "w" or result[0] == "W":\n        result = "LOL" + " " + result\n    if result[0] == "h" or result[0] == "H":\n        result = result.upper()\n    \n            \n    t_result = result.split()   \n    \n    count = 0\n    for m in t_result:\n        for n in m:\n            if n == "!":\n                break\n            \n            elif n.isalnum():\n                count += 1\n    \n    count = count + len(t_result) - 1\n    \n    if count >= 32:\n        if t_result[0] == "LOL":\n            t_result = ["OMG"] + t_result\n            t_result[0] = "LOL"\n            t_result[1] = "OMG"\n        else:\n            t_result = ["OMG"] + t_result\n    \n    \n    for k in range(0, len(t_result)):\n        if "?" in t_result[k]:\n            t_result[k] = t_result[k][:t_result[k].index("?")] + "?"*(len(t_result)-1) + t_result[k][t_result[k].index("?"):]\n        \n        if "!" in t_result[k]:\n            add_in = ""\n            for l in range(0, len(t_result)):\n                if l % 2 == 0:\n                    add_in = add_in + "!"\n                else:\n                    add_in = add_in + "1"\n            \n            t_result[k] = t_result[k][:t_result[k].index("!")] + add_in + t_result[k][t_result[k].index("!")+1:]        \n                \n    \n    for i in range(0, len(t_result)):\n        if i % 2 != 0:\n            t_result[i] = t_result[i].upper()\n    \n                \n    return " ".join(t_result)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'n00bify'
if _fn_name:
    if "Solution" in ns:
        try:
            _obj = ns["Solution"]()
            if hasattr(_obj, _fn_name):
                _target = getattr(_obj, _fn_name)
        except Exception:
            _target = None
    if _target is None and _fn_name in ns and callable(ns[_fn_name]):
        _target = ns[_fn_name]
# Fallback: if there's exactly one user-defined function, use it
if _target is None:
    _cands = [v for k, v in ns.items() if callable(v) and getattr(v, "__module__", "") in ("__judge__", "__main__")]
    _user_funcs = [c for c in _cands if getattr(c, "__name__", "").startswith("_") is False]
    if len(_user_funcs) == 1:
        _target = _user_funcs[0]
if _target is None:
    raise RuntimeError(f"Could not resolve callable '{_fn_name}'")

_raw = sys.stdin.read().strip()
if _raw:
    _parsed = json.loads(_raw)
    if isinstance(_parsed, dict):
        _kwargs = _parsed.get("kwargs", {})
        _args = _parsed.get("args", [])
    else:
        _args, _kwargs = _parsed, {}
else:
    _args, _kwargs = [], {}
if not isinstance(_args, (list, tuple)):
    _args = [_args]
_res = _target(*_args, **_kwargs)
try:
    sys.stdout.write(repr(_res) + "\n")
except Exception:
    pass

```

Measured memory_bytes: 8342