class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: B = None
        self.q: C = None
        self.s: C = None
        self.u: G = None
        self.x: G = None
        self.r: D = None
        self.w: C = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: G = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.o: E = None
        self.r: E = None
        self.q: I = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: D = None
        self.w: B = None
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: G = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.o: E = None
        self.r: E = None
        self.q: I = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: D = None
        self.w: B = None
        self.x: H = None
        self.txt = txt

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

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