class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.z: B = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.txt = txt

e = A("e")
l = B("l")
n = C("n")
k = D("k")
f = E("f")
i = E("i")
c = C("c")

e.r = l
e.y = l
e.z = l
e.t = n
l.o = i
l.p = n
l.v = k
l.r = f
n.z = e
n.x = e
n.p = f
n.w = i
k.s = f
k.t = f
k.r = c
k.x = i
k.v = l
f.v = k
f.u = k
i.v = k
i.u = k
c.z = e
c.x = e
c.p = i
c.w = i
assert n.w.u.v.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.z: B = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.txt = txt

e = A("e")
l = B("l")
n = C("n")
k = D("k")
f = E("f")
i = E("i")
c = C("c")

e.r = l
e.y = l
e.z = l
e.t = n
l.o = i
l.p = n
l.v = k
l.r = f
n.z = e
n.x = e
n.p = f
n.w = i
k.s = f
k.t = f
k.r = c
k.x = i
k.v = l
f.v = k
f.u = k
i.v = k
i.u = k
c.z = e
c.x = e
c.p = i
c.w = i
assert n.w.u.v.o.v.txt == "k"