class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: H = None
        self.q: D = None
        self.t: G = None
        self.u: F = None
        self.r: A = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: H = None
        self.q: D = None
        self.t: G = None
        self.u: F = None
        self.r: A = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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