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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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