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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.r: C = None
        self.p: C = None
        self.u: G = None
        self.t: H = None
        self.x: A = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

h.t = g
h.p = j
h.r = b
g.z = e
g.o = b
i.v = e
i.z = m
e.x = k
d.y = j
d.z = j
d.s = g
d.r = i
d.p = i
d.u = m
d.t = b
d.x = h
d.o = e
j.y = k
j.z = g
j.r = d
m.o = g
m.y = g
m.v = g
m.r = d
m.z = k
m.u = e
m.t = j
m.x = b
m.s = i
b.o = k
b.y = d
k.s = e
assert h.r.o.s.x.s.x.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.r: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.r: C = None
        self.p: C = None
        self.u: G = None
        self.t: H = None
        self.x: A = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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