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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.y: A = None
        self.q: H = None
        self.v: B = None
        self.u: F = None
        self.x: I = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.o: B = None
        self.r: G = None
        self.s: D = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.o: E = None
        self.q: B = None
        self.p: B = None
        self.x: B = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.y: A = None
        self.q: H = None
        self.v: B = None
        self.u: F = None
        self.x: I = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.o: B = None
        self.r: G = None
        self.s: D = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.o: E = None
        self.q: B = None
        self.p: B = None
        self.x: B = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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