class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.y: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.o: A = None
        self.s: G = None
        self.q: A = None
        self.t: C = None
        self.u: E = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.o: A = None
        self.s: G = None
        self.q: A = None
        self.t: C = None
        self.u: E = None
        self.p: H = None
        self.txt = txt

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

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