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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.r: H = None
        self.u: H = None
        self.p: F = None
        self.z: B = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.r: H = None
        self.u: H = None
        self.p: F = None
        self.z: B = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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