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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.s: D = None
        self.p: H = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: I = None
        self.p: H = None
        self.q: H = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

b = A("b")
j = B("j")
g = C("g")
f = D("f")
l = E("l")
k = F("k")
i = G("i")
c = H("c")
h = I("h")

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.s: D = None
        self.p: H = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: I = None
        self.p: H = None
        self.q: H = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

b = A("b")
j = B("j")
g = C("g")
f = D("f")
l = E("l")
k = F("k")
i = G("i")
c = H("c")
h = I("h")

b.v = c
j.q = h
j.s = h
j.z = i
j.y = i
j.u = k
j.w = g
g.x = l
g.z = l
g.s = f
g.p = c
g.y = c
g.u = c
f.u = k
f.y = h
f.p = c
f.q = c
f.o = g
l.y = h
l.t = b
l.q = g
k.v = b
k.o = b
i.u = h
i.x = c
i.p = g
i.v = g
c.w = l
h.y = j
h.v = k
assert b.v.w.y.v.v.v.w.y.txt == "h"