class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: D = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: H = None
        self.y: C = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.x: E = None
        self.w: D = None
        self.s: C = None
        self.p: A = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.v: D = None
        self.txt = txt

l = A("l")
b = B("b")
c = C("c")
a = D("a")
k = E("k")
e = F("e")
d = G("d")
j = H("j")
i = C("i")
m = B("m")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: H = None
        self.y: C = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.x: E = None
        self.w: D = None
        self.s: C = None
        self.p: A = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.v: D = None
        self.txt = txt

l = A("l")
b = B("b")
c = C("c")
a = D("a")
k = E("k")
e = F("e")
d = G("d")
j = H("j")
i = C("i")
m = B("m")

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