class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.t: D = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: A = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: I = None
        self.t: G = None
        self.z: G = None
        self.y: B = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.r: D = None
        self.z: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: A = None
        self.s: A = None
        self.y: C = None
        self.v: D = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: A = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: I = None
        self.t: G = None
        self.z: G = None
        self.y: B = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.r: D = None
        self.z: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: A = None
        self.s: A = None
        self.y: C = None
        self.v: D = None
        self.z: I = None
        self.txt = txt

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

k.u = g
k.t = g
k.o = e
k.w = c
k.v = h
l.o = c
l.q = c
l.z = k
l.t = h
c.r = l
g.w = a
g.t = a
g.z = a
g.q = a
g.o = f
g.y = l
g.r = e
e.t = h
e.u = h
e.y = l
h.v = k
h.t = g
a.y = d
a.u = k
a.r = g
a.z = g
a.p = h
d.v = k
f.r = k
f.t = k
f.s = k
f.y = c
f.v = g
f.z = i
i.r = k
i.t = k
i.s = k
i.y = c
i.v = g
i.z = f
assert k.o.y.q.r.z.o.u.txt == "h"