class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.p: B = None
        self.r: I = None
        self.s: C = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.t: E = None
        self.r: G = None
        self.v: I = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.v: A = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: F = None
        self.u: A = None
        self.v: E = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.u: G = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.t: E = None
        self.r: G = None
        self.v: I = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.v: A = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: F = None
        self.u: A = None
        self.v: E = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.u: G = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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