class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.t: C = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.x: B = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.v: E = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: D = None
        self.p: B = None
        self.u: D = None
        self.x: B = None
        self.txt = txt

n = A("n")
e = B("e")
a = C("a")
b = D("b")
d = E("d")
k = C("k")

n.v = e
n.w = e
n.t = a
n.s = d
n.u = b
e.y = b
a.v = b
a.z = d
a.s = d
a.x = e
b.z = n
b.u = n
b.r = n
b.v = d
b.y = e
d.z = e
d.p = e
d.x = e
d.s = b
d.u = b
k.v = b
k.z = d
k.s = d
k.x = e
assert k.v.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.t: C = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.x: B = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.v: E = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: D = None
        self.p: B = None
        self.u: D = None
        self.x: B = None
        self.txt = txt

n = A("n")
e = B("e")
a = C("a")
b = D("b")
d = E("d")
k = C("k")

n.v = e
n.w = e
n.t = a
n.s = d
n.u = b
e.y = b
a.v = b
a.z = d
a.s = d
a.x = e
b.z = n
b.u = n
b.r = n
b.v = d
b.y = e
d.z = e
d.p = e
d.x = e
d.s = b
d.u = b
k.v = b
k.z = d
k.s = d
k.x = e
assert k.v.u.u.txt == "b"