class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.v: E = None
        self.o: F = None
        self.y: D = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.s: B = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.v: E = None
        self.o: F = None
        self.y: D = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.s: B = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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