class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: J = None
        self.p: J = None
        self.y: I = None
        self.x: J = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: B = None
        self.r: B = None
        self.y: B = None
        self.t: A = None
        self.o: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: A = None
        self.p: I = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: B = None
        self.r: B = None
        self.y: B = None
        self.t: A = None
        self.o: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: A = None
        self.p: I = None
        self.y: G = None
        self.txt = txt

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

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