class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: I = 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.v: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: D = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.s: G = None
        self.y: C = None
        self.v: I = None
        self.x: G = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.x: A = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.txt = txt

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

j.s = d
j.p = b
d.o = a
a.v = b
a.t = d
m.t = b
m.p = b
m.q = h
m.z = d
c.r = a
c.y = a
c.q = h
c.s = e
c.x = e
c.v = b
c.t = b
g.w = j
g.x = j
g.y = j
g.z = d
g.t = e
e.o = d
e.q = j
l.z = j
l.r = e
l.u = e
l.v = d
l.t = d
l.q = h
l.p = b
b.y = l
b.z = d
h.t = b
h.p = b
h.q = m
h.z = d
assert a.t.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: I = 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.v: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: D = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.s: G = None
        self.y: C = None
        self.v: I = None
        self.x: G = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.x: A = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.txt = txt

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

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