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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: C = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.o: D = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: C = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.o: D = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

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

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