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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: F = None
        self.y: G = None
        self.x: A = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: H = None
        self.w: B = None
        self.q: C = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.v: E = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: F = None
        self.y: G = None
        self.x: A = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: H = None
        self.w: B = None
        self.q: C = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.v: E = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

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