class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: D = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.txt = txt

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

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

g = A("g")
c = B("c")
b = C("b")
m = D("m")
a = E("a")
d = D("d")
k = E("k")
e = E("e")
l = B("l")

g.w = k
g.t = d
g.y = a
g.q = l
c.r = l
c.o = l
c.u = e
c.t = m
b.y = g
b.w = d
m.p = g
m.v = k
m.z = b
a.v = d
a.q = d
a.t = c
a.x = k
d.p = g
d.v = a
d.z = b
k.v = d
k.q = d
k.t = c
k.x = a
e.v = m
e.q = d
e.t = l
e.x = k
l.r = c
l.o = c
l.u = k
l.t = m
assert c.t.z.y.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: D = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.txt = txt

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

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

g = A("g")
c = B("c")
b = C("b")
m = D("m")
a = E("a")
d = D("d")
k = E("k")
e = E("e")
l = B("l")

g.w = k
g.t = d
g.y = a
g.q = l
c.r = l
c.o = l
c.u = e
c.t = m
b.y = g
b.w = d
m.p = g
m.v = k
m.z = b
a.v = d
a.q = d
a.t = c
a.x = k
d.p = g
d.v = a
d.z = b
k.v = d
k.q = d
k.t = c
k.x = a
e.v = m
e.q = d
e.t = l
e.x = k
l.r = c
l.o = c
l.u = k
l.t = m
assert c.t.z.y.t.z.txt == "b"