class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.o: D = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: G = None
        self.z: F = None
        self.r: G = None
        self.u: J = None
        self.x: I = None
        self.w: A = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: G = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: H = None
        self.s: F = None
        self.q: H = None
        self.t: B = None
        self.w: I = None
        self.p: E = None
        self.txt = txt

a = A("a")
n = B("n")
i = C("i")
g = D("g")
c = E("c")
f = F("f")
j = G("j")
l = H("l")
e = I("e")
d = J("d")

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: G = None
        self.z: F = None
        self.r: G = None
        self.u: J = None
        self.x: I = None
        self.w: A = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: G = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: H = None
        self.s: F = None
        self.q: H = None
        self.t: B = None
        self.w: I = None
        self.p: E = None
        self.txt = txt

a = A("a")
n = B("n")
i = C("i")
g = D("g")
c = E("c")
f = F("f")
j = G("j")
l = H("l")
e = I("e")
d = J("d")

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