class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.y: B = None
        self.txt = txt

k = A("k")
c = B("c")
b = C("b")
j = D("j")
m = E("m")
l = D("l")
e = A("e")
f = B("f")

k.q = m
k.r = f
c.z = e
c.p = f
c.r = m
c.t = b
b.v = m
b.w = e
b.z = k
b.s = l
b.q = c
j.p = c
j.s = c
j.v = l
j.x = k
m.s = c
m.y = c
m.x = e
l.p = f
l.s = f
l.v = j
l.x = k
e.q = m
e.r = c
f.z = e
f.p = c
f.r = m
f.t = b
assert l.v.v.x.r.t.z.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.y: B = None
        self.txt = txt

k = A("k")
c = B("c")
b = C("b")
j = D("j")
m = E("m")
l = D("l")
e = A("e")
f = B("f")

k.q = m
k.r = f
c.z = e
c.p = f
c.r = m
c.t = b
b.v = m
b.w = e
b.z = k
b.s = l
b.q = c
j.p = c
j.s = c
j.v = l
j.x = k
m.s = c
m.y = c
m.x = e
l.p = f
l.s = f
l.v = j
l.x = k
e.q = m
e.r = c
f.z = e
f.p = c
f.r = m
f.t = b
assert l.v.v.x.r.t.z.q.x.txt == "e"