class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: B = None
        self.w: F = None
        self.y: B = None
        self.r: G = None
        self.v: B = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.q: H = None
        self.u: D = None
        self.p: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

e.u = j
b.y = f
b.p = j
h.z = d
h.r = d
h.q = d
h.p = b
h.y = b
h.v = b
h.w = i
h.o = i
j.v = f
j.o = d
m.w = j
m.u = j
m.z = l
m.q = n
m.p = b
m.v = b
m.r = d
i.u = b
i.t = d
d.t = i
n.t = h
n.o = i
f.u = j
l.w = j
l.u = j
l.z = m
l.q = n
l.p = b
l.v = b
l.r = d
assert m.q.t.p.y.u.v.u.v.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: B = None
        self.w: F = None
        self.y: B = None
        self.r: G = None
        self.v: B = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.q: H = None
        self.u: D = None
        self.p: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

e.u = j
b.y = f
b.p = j
h.z = d
h.r = d
h.q = d
h.p = b
h.y = b
h.v = b
h.w = i
h.o = i
j.v = f
j.o = d
m.w = j
m.u = j
m.z = l
m.q = n
m.p = b
m.v = b
m.r = d
i.u = b
i.t = d
d.t = i
n.t = h
n.o = i
f.u = j
l.w = j
l.u = j
l.z = m
l.q = n
l.p = b
l.v = b
l.r = d
assert m.q.t.p.y.u.v.u.v.u.o.txt == "d"