## Task

Generate a sorted list of all possible IP addresses in a network.

For a subnet that is not a valid IPv4 network return `None`.

## Examples
```
ipsubnet2list("192.168.1.0/31") == ["192.168.1.0", "192.168.1.1"]
ipsubnet2list("213.256.46.160/28") == None
```

```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 cidr_to_bits(subnet): \n    subnet_int = int(subnet[-2:]) \n    mask_in_bits = [(1,0)[i > subnet_int] for i in range(1,33)]\n    return mask_in_bits  \n\ndef ip_bits(subnet):\n    ip_bits_str =  list([format(int(x),'#010b')[2:] for x in subnet[:-3].split('.')])\n    ip_bits_int = [ int(i) for x in ip_bits_str for i in x]\n    return ip_bits_int # Address from input in bits\n\ndef f_addr_bits(x):\n    return [ i&j for i,j in zip(ip_bits(x),cidr_to_bits(x))] #  AND opperation on IP in bits and MASK in bits to achive first address in pool\n\ndef l_addr_bits(x):\n    not_on_mask = [(0,1)[ i == 0] for  i in cidr_to_bits(x)] #  OR opperation on IP in bits and MASK in bits to achive last address in pool\n    return  [ i|j for i,j in zip(f_addr_bits(x),not_on_mask)]\n\ndef address_to_int(bits_lst):\n    return [int(''.join(str(bits_lst[y+i]) for i in range(8)),2) for y in range(0,32,8)] # Translate list of 32 bits to 4 octets with ints [192, 168, 0 ,1] \n\ndef list_of_addresses(x):\n    first_address = address_to_int(f_addr_bits(x)) \n    last_address = address_to_int(l_addr_bits(x))\n    octets_ranges = [ [ i for i in range(i,j+1)] if j-i != 0 else [i] for i,j in zip(first_address,last_address)] # compare octets from first and last address if subtraction differs from 0 generate range of numbers \n    addresses = []\n    for first_oct in octets_ranges[0]:\n        for second in octets_ranges[1]:\n                for third in octets_ranges[2]:\n                        for fourth in octets_ranges[3]:\n                            addresses.append(f'{first_oct}.{second}.{third}.{fourth}')\n    return addresses \n\ndef ipsubnet2list(subnet):\n    result = list_of_addresses(subnet)\n    \n    if subnet[:-3] in result:\n        if len(result) == 2: # this condition is only because kata is made kind of retarded, with 192.168.1.0/31 creator of this kata wants list [192.168.1.0, 192.168.1.1] but those are not host IP's like in other inputs\n            return result     \n        return result[1:-1]\n    \n    else:\n        return None\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'ipsubnet2list'
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: 9134