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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.p: H = None
        self.r: A = None
        self.q: F = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.p: H = None
        self.r: A = None
        self.q: F = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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