Implement a function which 
creates a **[radix tree](https://en.wikipedia.org/wiki/Radix_tree)** (a space-optimized trie [prefix tree]) 
in which each node that is the only child is merged with its parent [unless a word from the input ends there]) 
from a given list of words 
using dictionaries (aka hash maps or hash tables) where:
1. The dictionary keys are the nodes.
2. Leaf nodes are empty dictionaries.
3. The value for empty input is an empty dictionary.
4. Words are all lowercase or empty strings.
5. Words can contain duplicates.
### Examples:
```python
>>> radix_tree()
{}
>>> radix_tree("")
{}
>>> radix_tree("", "")
{}
>>> radix_tree("radix", "tree")
{"radix": {}, "tree": {}}
>>> radix_tree("ape", "apple")
{"ap": {"e": {}, "ple": {}}}
>>> radix_tree("apple", "applet", "apple", "ape")
{"ap": {"ple": {"t": {}}, "e": {}}}
>>> radix_tree("romane", "romanus", "romulus", "rubens", "rubicon", "rubicundus")
{"r": {"om": {"an": {"e": {}, "us": {}}, "ulus": {}},
       "ub": {"ens": {}, "ic": {"on": {}, "undus": {}}}}}
>>> radix_tree("appleabcd", "apple")
{"apple": {"abcd": {}}}
```
from itertools import groupby
def radix_tree(*d, need=1):
    if not {i for i in d if i} : return {} 
    store = {}
    for i, j in groupby(sorted(d) if need else d, lambda x: x[0]):
        words = list(j)
        if len(words) == 1 : store[words[0]] = {}
        else:
            common = next((j for j, i in enumerate(zip(*words)) if len(set(i)) != 1), len(min(words, key=len)))
            store[words[0][:common]] = radix_tree(*[i[common:] for i in words if i[common:]],need = 0)
    return store
from itertools import groupby
def radix_tree(*d, need=1):
    if not {i for i in d if i} : return {} 
    store = {}
    for i, j in groupby(sorted(d) if need else d, lambda x: x[0]):
        words = list(j)
        if len(words) == 1 : store[words[0]] = {}
        else:
            common = next((j for j, i in enumerate(zip(*words)) if len(set(i)) != 1), len(min(words, key=len)))
            store[words[0][:common]] = radix_tree(*[i[common:] for i in words if i[common:]],need = 0)
    return store