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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: C = None
        self.r: F = None
        self.u: F = None
        self.x: C = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.t: E = None
        self.z: A = None
        self.w: C = None
        self.y: F = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: C = None
        self.r: G = None
        self.v: A = None
        self.z: A = None
        self.q: B = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: C = None
        self.r: F = None
        self.u: F = None
        self.x: C = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.t: E = None
        self.z: A = None
        self.w: C = None
        self.y: F = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: C = None
        self.r: G = None
        self.v: A = None
        self.z: A = None
        self.q: B = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

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