class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: G = None
        self.t: G = None
        self.z: F = None
        self.v: G = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.p: D = None
        self.w: C = None
        self.t: F = None
        self.q: H = None
        self.x: I = None
        self.v: I = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: A = None
        self.x: D = None
        self.z: F = None
        self.q: B = None
        self.p: I = None
        self.u: G = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: I = None
        self.w: E = None
        self.x: F = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.s: B = None
        self.q: C = None
        self.p: F = None
        self.v: F = None
        self.w: A = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.p: D = None
        self.w: C = None
        self.t: F = None
        self.q: H = None
        self.x: I = None
        self.v: I = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: A = None
        self.x: D = None
        self.z: F = None
        self.q: B = None
        self.p: I = None
        self.u: G = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: I = None
        self.w: E = None
        self.x: F = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.s: B = None
        self.q: C = None
        self.p: F = None
        self.v: F = None
        self.w: A = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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