class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.z: D = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.txt = txt

e = A("e")
n = B("n")
b = C("b")
j = D("j")
f = E("f")
d = B("d")
g = D("g")
l = C("l")

e.v = d
n.w = b
n.o = b
n.q = g
n.z = j
n.s = d
b.u = f
b.r = d
b.p = l
j.x = f
j.y = b
j.p = g
f.o = j
f.t = l
d.w = l
d.q = j
d.z = j
d.s = n
d.o = b
g.x = f
g.y = l
g.p = j
l.u = f
l.r = n
l.p = b
assert g.x.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.z: D = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.txt = txt

e = A("e")
n = B("n")
b = C("b")
j = D("j")
f = E("f")
d = B("d")
g = D("g")
l = C("l")

e.v = d
n.w = b
n.o = b
n.q = g
n.z = j
n.s = d
b.u = f
b.r = d
b.p = l
j.x = f
j.y = b
j.p = g
f.o = j
f.t = l
d.w = l
d.q = j
d.z = j
d.s = n
d.o = b
g.x = f
g.y = l
g.p = j
l.u = f
l.r = n
l.p = b
assert g.x.t.r.txt == "n"