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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.u: C = None
        self.p: B = None
        self.x: A = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.u: D = None
        self.o: E = None
        self.s: B = None
        self.z: D = None
        self.p: D = None
        self.v: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.u: C = None
        self.p: B = None
        self.x: A = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.u: D = None
        self.o: E = None
        self.s: B = None
        self.z: D = None
        self.p: D = None
        self.v: H = None
        self.txt = txt

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

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