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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: E = None
        self.q: E = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: C = None
        self.x: A = None
        self.u: E = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

k = A("k")
l = B("l")
b = C("b")
e = D("e")
m = E("m")
c = F("c")
n = G("n")
g = H("g")
a = I("a")

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: E = None
        self.q: E = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: C = None
        self.x: A = None
        self.u: E = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

k = A("k")
l = B("l")
b = C("b")
e = D("e")
m = E("m")
c = F("c")
n = G("n")
g = H("g")
a = I("a")

k.u = g
l.z = g
l.r = g
l.t = m
b.v = g
b.s = g
b.o = n
e.t = c
e.z = c
e.u = m
e.q = m
e.o = m
m.y = a
m.v = k
m.u = l
c.p = e
c.q = m
c.y = n
n.z = l
n.y = c
n.x = a
n.v = a
g.u = c
g.p = a
a.w = l
a.q = b
a.x = k
a.t = k
a.r = k
a.u = m
assert c.y.y.p.z.p.z.txt == "c"