class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: B = None
        self.w: H = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: A = None
        self.w: A = None
        self.y: A = None
        self.z: G = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.v: B = None
        self.o: I = None
        self.q: C = None
        self.z: I = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.z: A = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

c = A("c")
l = B("l")
b = C("b")
h = D("h")
a = E("a")
i = F("i")
n = G("n")
d = H("d")
e = I("e")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: B = None
        self.w: H = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: A = None
        self.w: A = None
        self.y: A = None
        self.z: G = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.v: B = None
        self.o: I = None
        self.q: C = None
        self.z: I = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.z: A = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

c = A("c")
l = B("l")
b = C("b")
h = D("h")
a = E("a")
i = F("i")
n = G("n")
d = H("d")
e = I("e")

c.v = e
c.r = d
l.x = i
l.v = d
l.r = n
b.v = h
b.o = l
b.w = d
b.r = d
b.p = a
h.v = n
a.x = l
a.o = l
i.q = d
i.t = c
i.w = c
i.y = c
i.z = n
i.x = e
n.s = l
n.t = l
n.v = l
n.o = e
n.z = e
n.w = e
n.q = b
n.u = i
d.z = b
e.o = a
e.q = a
e.y = a
e.u = h
e.z = c
assert h.v.t.v.z.r.z.o.x.z.txt == "n"