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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: I = None
        self.x: E = None
        self.v: E = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.s: A = None
        self.x: G = None
        self.w: E = None
        self.z: I = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: I = None
        self.x: E = None
        self.v: E = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.s: A = None
        self.x: G = None
        self.w: E = None
        self.z: I = None
        self.v: I = None
        self.txt = txt

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

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

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